android

Drawable resources and NetBeans (Android Development)

Hey guys. I'm newer in android development. And after using eclipse about 1 month... i hate this. I've setup NetBeans IDE for android development. It's fast, it's looks like cool and i like it. But have one trouble. I cant find how to use drawable resources (just like R.drawable.icon) :( . Can anyone help me? PS: sry 4 my english )))))...

Can't install APK from browser downloads

I've downloaded an APK from web, using the default browser and it can't be opened from the Browser -> Downloads. It tells me "Can't open file" But I can use a file browser (like OI File Browser) to browse and open this APK, and it works well. What could be the problem here? Is it about the HTTP header? ...

How do I know that the Soundpool is ready using SDK target below 2.2?

This question is related to this one. I managed to modify my code to use SoundPool instead of AudioManager. Know it works more or less. public class Sound { private static boolean sound = true; private static final int EAT_SOUND = 1; private static final int SHORT_EAT_SOUND = 2; private static final int EAT_CHERRY_SOU...

ImageSpan is cut off / incorrectly aligned

Hello, I am implementing emoticons using the following code: builder.setSpan(new ImageSpan(mContext, resId, ImageSpan.ALIGN_BASELINE), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE ); The result (builder) is set as text to a TextView. It works just fine if the span is surrounded by text, i.e. when...

Video frame capture

Is it possible to capture a frame from a video in android and save it or use it in any way in the application? ...

android back end email process using my webserver smpt

hi how to send email from android using my server smtp ...

Activity Lifecycle: startActivityForResult and press Back Button

Is there a method of the Activity lifecycle which is called if the user presses the back button, but not if the the method startActivityForResult() is called? I couldn't find a method by testing it. ...

With android I want to have 2 preferences with the same key

I have 2 prefs - a song title and the audio state(mute or volume) that I want to store in the same key. This works for the clicks and the only problem I have is resetting the summary on onSharedPreferencesChanged I get errors with this. PreferenceScreen musicPrefScreen = (PreferenceScreen)getPreferenceScreen ().findPreference("...

How to fix "process is bad" error for an Android Widget?

I have developed an Android Widget, and it was working fine. I added some extra functionality and pushed an update through the Android Market. Now people are complaining that it doesn't work anymore. The error I see in the logs is: 07-14 10:33:44.016: WARN/ActivityManager(78): Unable to launch app ... for broadcast Intent { act=androi...

What is the proper way to handle a ProgressDialog using Activity lifecycle methods ?

I have been bitten by: "java.lang.IllegalArgumentException: View not attached to window manager", when using a ProgressDialog in an Activity. What is the proper way to handle a ProgressDialog using Activity lifecycle methods ? Working code example much appreciated... ...

MyLocationOverlay: getMyLocation returning null

I have a mapview page that displays the current location in the map. I am using MyLocationOverlay for the purpose. The code for that goes as follows: myLocationOverlay = new MyLocationOverlay(this, mapView); myLocationOverlay.enableCompass(); myLocationOverlay.enableMyLocation(); myLocationOverlay.runOnFirstFix(new Runnable() { public...

Map View errors when I used it for the second time in Android (Titanium)

Hi I have records on the table list contains data that has latitude & longitude on the listing widow. When I click on each row, it passes to the detail window that display the mapview and its annotation of that record. I zoom in & out, moved to different area and I clicked "back" button to go back to the record list. Then, I selected ...

sharedUserId: safe to change when app is already in market?

For the next version of our application, I want to change the sharedUserId since we now use an internal control dashboard app which must write to the other app's settings files. But since the app is already installed on many phones, will this be a problem? I ran a little test on the emulator, and I'm seeing exceptions in the device logs...

Google Spreadsheet API update \ edit with protocol

Hi, I'm trying to implement some basic functionality for Google Spreadsheets, using the protocol specification with requests. The reason i'm doing this because it is for Android, and gdata-java library doesn't really work and the alpha android one doesn't really cut it. I managed to implement authentication, and get for lists, and delet...

Why should I use startActivity in a Service

Why should I use startActivity() in a Service? If I need an Activity a have to call an activity and if I need a "delayed activity" I have to use the notification. So, why should I use startActivity()? ...

EditText and TabHost do not like each other...

I have a layout with EditText and TabHost containing 2 tabs. Android 1.6. I use hardware keyboard in following case. Steps to reproduce: When activity is displayed the EditText gains focus. As soon as I press any key the EditText loses focus and first tab gains it. I click on the EditText again and start typing. It works unless ...

.apk file not working on device

Hi, i took an android project and imported it in eclipse. in properties->android section it is showing platform 1.6 and API level 4. I have downloaded Android 2.2. Now when i try to make some changes in the source code and make an .apk file and try to install on my android device the device shows an error : Application not installed. the...

android video thumbnails

I know that google does not have the official API to get video thumbnails under API 2.0 but how do I access the video thumbnails that are shown in the Gallery application. They are stored somewhere ? ...

How to move from one class to other class in android

I want to know how to move from one class to other class in android. I have one main class i.e Addition.java(Main Activity) and i created other subactivity(Form.java). I want to how to make my move from one class(ie.Activity)to other. I tried this,but not working out,just trying to figure out Intent intent = new Intent(); intent.setCl...

Obtaining Time zone in android

Is there a way to obtain the time zone from the callbacks received void onLocationChanged(Location location) using the time information that can be obtained from the location parameter long Time = location.getTime(); Or if there is another way please provide info! ...