android Programming Glossary: even
Sending and Receiving SMS and MMS in Android (pre Kit Kat Android 4.4) http://stackoverflow.com/questions/14452808/sending-and-receiving-sms-and-mms-in-android-pre-kit-kat-android-4-4 send and receive MMS you must have the Mobile Data enabled even if you are using Wifi if the Mobile Data is enabled you will.. Data is enabled you will be able to receive and send MMS even if Wifi is showing as your internet on your device. It is a.. as if you do not have it on the message can hang a lot even when turning on Mobile Data and might require a reboot of the..
Android: ListView elements with multiple clickable buttons http://stackoverflow.com/questions/1709166/android-listview-elements-with-multiple-clickable-buttons goes directly to the next list item ignoring the buttons even though I set .setFocusable true and setClickable true for the..
How can I check the current status of the GPS receiver? http://stackoverflow.com/questions/2021176/how-can-i-check-the-current-status-of-the-gps-receiver GpsStatus.Listener public void onGpsStatusChanged int event switch event case GpsStatus.GPS_EVENT_SATELLITE_STATUS if.. public void onGpsStatusChanged int event switch event case GpsStatus.GPS_EVENT_SATELLITE_STATUS if mLastLocation.. this comes close to replicating its behavior. It could even outdo it lol. Hope this helps someone. share improve this answer..
Quitting an application - is that frowned upon? http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon android share improve this question This will eventually get to your question but I first want to address a number.. since many iPhone apps pick up where the user left off even if the app really was shut down since iPhone only allows one..
How to discover memory usage of my application in Android http://stackoverflow.com/questions/2298208/how-to-discover-memory-usage-of-my-application-in-android let alone swap which we don't use on Android and it is even less clear. Thus if you were to take all of the physical RAM..
What are the best practices for SQLite on Android? http://stackoverflow.com/questions/2493331/what-are-the-best-practices-for-sqlite-on-android There are situations where your update calls will fail even if your database doesn't get corrupted. The basic answer. The..
How can I connect to Android with ADB over TCP? http://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp adbd From a Computer if You Have USB Access Already It is even easier to switch to using WiFi if you already have USB access...
Focusable EditText inside ListView http://stackoverflow.com/questions/2679948/focusable-edittext-inside-listview items like normal but when I get to a particular row even if I have to explicitly identify the row that has a focusable.. drawn in non touch mode and EditText can never get focus even if you tap on it. To make matters worse calling editTextView.requestFocus.. This happens when you start scrolling so we need to prevent it from staying in the afterDescendants mode if the EditText..
“Conversion to Dalvik format failed with error 1” on external JAR http://stackoverflow.com/questions/2680827/conversion-to-dalvik-format-failed-with-error-1-on-external-jar solution but none of the possible solutions work. I even tried to change to Android 1.6 instead of 1.5 the current version..
Make an HTTP request with android http://stackoverflow.com/questions/3505930/make-an-http-request-with-android but I don't want to show the webpage. If possible I even want to do it in the background in an BroadcastReceiver android..
Enable GPS programatically like Tasker http://stackoverflow.com/questions/4721449/enable-gps-programatically-like-tasker many android versions and different devices and you don't even need to be rooted. I would like to do this in my app. Of course..
Auto Scale TextView Text to Fit within Bounds http://stackoverflow.com/questions/5033012/auto-scale-textview-text-to-fit-within-bounds layout.getLineForVertical height 1 If the text would not even fit on a single line clear it if lastLine 0 setText Otherwise..
Save bitmap to location http://stackoverflow.com/questions/649154/save-bitmap-to-location a byte array. I am not sure how to convert if this is even the right way from Bitmap to byte array so I can use a FileOutputStream..
ViewPager PagerAdapter not updating the View http://stackoverflow.com/questions/7263291/viewpager-pageradapter-not-updating-the-view mAdapter.notifyDataSetChanged mViewPager.invalidate even creating a brand new adapter each time I want to use a new List..
AsyncTask Android example http://stackoverflow.com/questions/9671546/asynctask-android-example after the heavy lifting occurs in this new thread you can even pass the result of the long operation to postExecute to then..
bitmap size exceeds Vm budget error android http://stackoverflow.com/questions/10737582/bitmap-size-exceeds-vm-budget-error-android through it you will understand its pretty useful software. Even if this doesn't solves your problem use the WeakReference for..
How did Google manage to do this? Slide ActionBar in Android application http://stackoverflow.com/questions/11234375/how-did-google-manage-to-do-this-slide-actionbar-in-android-application improve this question In fact there's a way to do this. Even without implementing your own ActionBar. Just have a look at.. import android.util.AttributeSet import android.view.MotionEvent public class ExtendedViewPager extends ViewPager private boolean.. attrs this.enabled true @Override public boolean onTouchEvent MotionEvent event if this.enabled return super.onTouchEvent..
Android emulator doesn't take keyboard input - SDK tools rev 20 http://stackoverflow.com/questions/11235370/android-emulator-doesnt-take-keyboard-input-sdk-tools-rev-20 you can set hw.mainKeys no to enable them. Original answer Even though the developer documentation says keyboard support is..
Google maps api v2 custom infowindow like in original android google maps http://stackoverflow.com/questions/14123243/google-maps-api-v2-custom-infowindow-like-in-original-android-google-maps Override the MapWrapperLayout's dispatchTouchEvent and if the InfoWindow is currently shown first route the MotionEvents.. if the InfoWindow is currently shown first route the MotionEvents to the previously created InfoWindow. If it doesn't consume.. created InfoWindow. If it doesn't consume the MotionEvents like because you didn't click on any clickable area inside..
Rotating a bitmap using JNI & NDK http://stackoverflow.com/questions/14398670/rotating-a-bitmap-using-jni-ndk bitmap. free the pixels and return the bitmap. The problem Even though everything seems to run without any errors the output..
Sending and Receiving SMS and MMS in Android (pre Kit Kat Android 4.4) http://stackoverflow.com/questions/14452808/sending-and-receiving-sms-and-mms-in-android-pre-kit-kat-android-4-4 on prior the incoming MMS attachment will not be received. Even if I turn it on after the message was received. For some reason..
Slow Android emulator http://stackoverflow.com/questions/1554099/slow-android-emulator that is very rare. How can I if possible fix this problem Even if it starts and loads the home screen it is very sluggish...
What are the best practices for SQLite on Android? http://stackoverflow.com/questions/2493331/what-are-the-best-practices-for-sqlite-on-android regardless. So one helper instance one db connection. Even if you use it from multiple threads one connection at a time...
ListView item background via custom selector http://stackoverflow.com/questions/2562051/listview-item-background-via-custom-selector false android drawable @drawable list_item_gradient Even though these two point to the same resource have two states..
Android: How to create a Dialog without a title? http://stackoverflow.com/questions/2644134/android-how-to-create-a-dialog-without-a-title Everythings works fine except for the title of the Dialog. Even if I don't set the title of the dialog the dialog popup has..
Effective Android Programming Techniques [closed] http://stackoverflow.com/questions/2961049/effective-android-programming-techniques find some code that uses that parameter. Use Eclipse Even you have a favorite editor or IDE you have used for years use..
Android singleTask or singleInstance launch mode? http://stackoverflow.com/questions/3219726/android-singletask-or-singleinstance-launch-mode position to handle the intent and the intent is dropped. Even though the intent is dropped its arrival would have caused the..
How to change font face of Webview in Android? http://stackoverflow.com/questions/3900658/how-to-change-font-face-of-webview-in-android font face custom font share improve this question Even simpler you can use the Asset URL format to reference the font...
The connection to adb is down and a sever error has occured http://stackoverflow.com/questions/4072706/the-connection-to-adb-is-down-and-a-sever-error-has-occured I've spent days trying to launch any Android program. Even Hello World gives me the same error The connection to adb is..
Custom notification layouts and text colors http://stackoverflow.com/questions/4867338/custom-notification-layouts-and-text-colors because the text is black instead of the default white. Even the official documentation just sets a #000 color for a TextView.. the default contentView created by Notification.setLatestEventInfo ... . When you find the right TextView just get the tv.getTextColors.. return try Notification ntf new Notification ntf.setLatestEventInfo this COLOR_SEARCH_RECURSE_TIP Utest null LinearLayout group..
Android: failed to allocate memory http://stackoverflow.com/questions/5969067/android-failed-to-allocate-memory be launched however it doesn't actually have 2 GB of RAM. Even with a 4.1 Emulator the RAM Size is at 512 MB. Recommendation..
Admob implementation Error http://stackoverflow.com/questions/7947165/admob-implementation-error error message after integrating the latest AdMob SDK. Even though I have found this and the other two related discussions..
ViewPager and fragments ??what's the right way to store fragment's state? http://stackoverflow.com/questions/7951730/viewpager-and-fragments-whats-the-right-way-to-store-fragments-state initialisation code inside the getItem int method. Even if we were not using a FragmentPagerAdapter it is not a good..
Android REST client, Sample? http://stackoverflow.com/questions/8267928/android-rest-client-sample REST client Sample Even if this thread has accepted answer feel free to propose other..
support FragmentPagerAdapter holds reference to old fragments http://stackoverflow.com/questions/9727173/support-fragmentpageradapter-holds-reference-to-old-fragments added to the fragment manager are saved automatically. Even if your app is killed this information is restored when you..
Sending and Receiving SMS and MMS in Android (pre Kit Kat Android 4.4) http://stackoverflow.com/questions/14452808/sending-and-receiving-sms-and-mms-in-android-pre-kit-kat-android-4-4 when your phone provider enables you with the ability to send and receive MMS you must have the Mobile Data enabled even if you are using Wifi if the Mobile Data is enabled you will be able to receive and send MMS even if Wifi is showing as.. Mobile Data enabled even if you are using Wifi if the Mobile Data is enabled you will be able to receive and send MMS even if Wifi is showing as your internet on your device. It is a real pain as if you do not have it on the message can hang a.. is showing as your internet on your device. It is a real pain as if you do not have it on the message can hang a lot even when turning on Mobile Data and might require a reboot of the device. And GO Through this code http downloads.ziddu.com..
Android: ListView elements with multiple clickable buttons http://stackoverflow.com/questions/1709166/android-listview-elements-with-multiple-clickable-buttons It always selects the whole list item and from there goes directly to the next list item ignoring the buttons even though I set .setFocusable true and setClickable true for the buttons in getView . I also added this code to my custom list..
How can I check the current status of the GPS receiver? http://stackoverflow.com/questions/2021176/how-can-i-check-the-current-status-of-the-gps-receiver the GpsStatus.Listener private class MyGPSListener implements GpsStatus.Listener public void onGpsStatusChanged int event switch event case GpsStatus.GPS_EVENT_SATELLITE_STATUS if mLastLocation null isGPSFix SystemClock.elapsedRealtime mLastLocationMillis.. private class MyGPSListener implements GpsStatus.Listener public void onGpsStatusChanged int event switch event case GpsStatus.GPS_EVENT_SATELLITE_STATUS if mLastLocation null isGPSFix SystemClock.elapsedRealtime mLastLocationMillis..
Quitting an application - is that frowned upon? http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon good right now Is there a way for me to really quit the application android share improve this question This will eventually get to your question but I first want to address a number of issues you raise in your various comments to the various.. button does not necessarily feel like the app was terminated since many iPhone apps pick up where the user left off even if the app really was shut down since iPhone only allows one third party app at a time at present . As I said above there..
How to discover memory usage of my application in Android http://stackoverflow.com/questions/2298208/how-to-discover-memory-usage-of-my-application-in-android uses is really not clear. Add on top of that paging out to disk let alone swap which we don't use on Android and it is even less clear. Thus if you were to take all of the physical RAM actually mapped in to each process and add up all of the processes..
What are the best practices for SQLite on Android? http://stackoverflow.com/questions/2493331/what-are-the-best-practices-for-sqlite-on-android be careful with how you create your connections and use them. There are situations where your update calls will fail even if your database doesn't get corrupted. The basic answer. The SqliteOpenHelper object holds on to one database connection...
How can I connect to Android with ADB over TCP? http://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp on USB with setprop service.adb.tcp.port 1 stop adbd start adbd From a Computer if You Have USB Access Already It is even easier to switch to using WiFi if you already have USB access. From a command line on the computer that has the device connected..
Focusable EditText inside ListView http://stackoverflow.com/questions/2679948/focusable-edittext-inside-listview to use the jogball arrows to navigate the selector to individual items like normal but when I get to a particular row even if I have to explicitly identify the row that has a focusable child I want that child to take focus instead of indicating.. experience. 2. setItemsCanFocus false selector is always drawn in non touch mode and EditText can never get focus even if you tap on it. To make matters worse calling editTextView.requestFocus returns true but in fact does not give the EditText.. public void onNothingSelected AdapterView listView This happens when you start scrolling so we need to prevent it from staying in the afterDescendants mode if the EditText was focused listView.setDescendantFocusability ViewGroup.FOCUS_BEFORE_DESCENDANTS..
“Conversion to Dalvik format failed with error 1” on external JAR http://stackoverflow.com/questions/2680827/conversion-to-dalvik-format-failed-with-error-1-on-external-jar file to my project. I searched for a long time for the possible solution but none of the possible solutions work. I even tried to change to Android 1.6 instead of 1.5 the current version I use . android dalvik android sdk 1.6 share improve..
Make an HTTP request with android http://stackoverflow.com/questions/3505930/make-an-http-request-with-android request I want to request an PHP page script on one of my website but I don't want to show the webpage. If possible I even want to do it in the background in an BroadcastReceiver android httpwebrequest share improve this question First of..
Enable GPS programatically like Tasker http://stackoverflow.com/questions/4721449/enable-gps-programatically-like-tasker can't be signed with the firmware signing key as it works on many android versions and different devices and you don't even need to be rooted. I would like to do this in my app. Of course I don't want to blow up the users privacy so I would first..
Auto Scale TextView Text to Fit within Bounds http://stackoverflow.com/questions/5033012/auto-scale-textview-text-to-fit-within-bounds cut off we must trim up to the previous line int lastLine layout.getLineForVertical height 1 If the text would not even fit on a single line clear it if lastLine 0 setText Otherwise trim to the previous line and add an ellipsis else int..
Save bitmap to location http://stackoverflow.com/questions/649154/save-bitmap-to-location a particular folder is to use FileOutputStream but that requires a byte array. I am not sure how to convert if this is even the right way from Bitmap to byte array so I can use a FileOutputStream to write the data. The other option I have is to..
ViewPager PagerAdapter not updating the View http://stackoverflow.com/questions/7263291/viewpager-pageradapter-not-updating-the-view a new set of Views. I've tried all sorts of things like calling mAdapter.notifyDataSetChanged mViewPager.invalidate even creating a brand new adapter each time I want to use a new List of data. Nothing has helped the textviews remain unchanged..
AsyncTask Android example http://stackoverflow.com/questions/9671546/asynctask-android-example and postExecute offer you access to GUI before and after the heavy lifting occurs in this new thread you can even pass the result of the long operation to postExecute to then show any results of processing. See these lines where you later..
bitmap size exceeds Vm budget error android http://stackoverflow.com/questions/10737582/bitmap-size-exceeds-vm-budget-error-android downloads.php Its a bit complicated software but as you go through it you will understand its pretty useful software. Even if this doesn't solves your problem use the WeakReference for bitmaps. Please refer this link How to use WeakReference in..
How did Google manage to do this? Slide ActionBar in Android application http://stackoverflow.com/questions/11234375/how-did-google-manage-to-do-this-slide-actionbar-in-android-application widget android actionbar android side navigation share improve this question In fact there's a way to do this. Even without implementing your own ActionBar. Just have a look at the hierachyviewer Located in the tools directory There's the.. import android.support.v4.view.ViewPager import android.util.AttributeSet import android.view.MotionEvent public class ExtendedViewPager extends ViewPager private boolean enabled public ExtendedViewPager Context context AttributeSet.. Context context AttributeSet attrs super context attrs this.enabled true @Override public boolean onTouchEvent MotionEvent event if this.enabled return super.onTouchEvent event return false @Override public boolean onInterceptTouchEvent..
Android emulator doesn't take keyboard input - SDK tools rev 20 http://stackoverflow.com/questions/11235370/android-emulator-doesnt-take-keyboard-input-sdk-tools-rev-20 main keys Back Home etc. are missing from your emulator you can set hw.mainKeys no to enable them. Original answer Even though the developer documentation says keyboard support is enabled by default it doesn't seem to be that way in SDK rev..
Google maps api v2 custom infowindow like in original android google maps http://stackoverflow.com/questions/14123243/google-maps-api-v2-custom-infowindow-like-in-original-android-google-maps or MapView inside a custom ViewGroup mine is called MapWrapperLayout Override the MapWrapperLayout's dispatchTouchEvent and if the InfoWindow is currently shown first route the MotionEvents to the previously created InfoWindow. If it doesn't.. Override the MapWrapperLayout's dispatchTouchEvent and if the InfoWindow is currently shown first route the MotionEvents to the previously created InfoWindow. If it doesn't consume the MotionEvents like because you didn't click on any clickable.. is currently shown first route the MotionEvents to the previously created InfoWindow. If it doesn't consume the MotionEvents like because you didn't click on any clickable area inside InfoWindow etc. then and only then let the events go down to..
Rotating a bitmap using JNI & NDK http://stackoverflow.com/questions/14398670/rotating-a-bitmap-using-jni-ndk a new bitmap of opposite size. put the pixels into the new bitmap. free the pixels and return the bitmap. The problem Even though everything seems to run without any errors the output image is not a rotation of the original. In fact it ruins it..
Sending and Receiving SMS and MMS in Android (pre Kit Kat Android 4.4) http://stackoverflow.com/questions/14452808/sending-and-receiving-sms-and-mms-in-android-pre-kit-kat-android-4-4 with a download button. But if I do not have mobile data on prior the incoming MMS attachment will not be received. Even if I turn it on after the message was received. For some reason when your phone provider enables you with the ability to..
Slow Android emulator http://stackoverflow.com/questions/1554099/slow-android-emulator have had some success in starting the emulator quickly but that is very rare. How can I if possible fix this problem Even if it starts and loads the home screen it is very sluggish. I have tried the Eclipse IDE in Galileos and Ganymede. android..
What are the best practices for SQLite on Android? http://stackoverflow.com/questions/2493331/what-are-the-best-practices-for-sqlite-on-android Call the read only and you'll get the write database connection regardless. So one helper instance one db connection. Even if you use it from multiple threads one connection at a time. The SqliteDatabase object uses java locks to keep access serialized...
ListView item background via custom selector http://stackoverflow.com/questions/2562051/listview-item-background-via-custom-selector schemas.android.com apk res android item android state_focused false android drawable @drawable list_item_gradient Even though these two point to the same resource have two states so the drawable will invalidate itself when coming out of pressed..
Android: How to create a Dialog without a title? http://stackoverflow.com/questions/2644134/android-how-to-create-a-dialog-without-a-title new Dialog this dialog.setContentView R.layout.my_dialog Everythings works fine except for the title of the Dialog. Even if I don't set the title of the dialog the dialog popup has a blank space at the position of the dialog. Is there any way..
Effective Android Programming Techniques [closed] http://stackoverflow.com/questions/2961049/effective-android-programming-techniques sample_code or your favorite searching routine to quickly find some code that uses that parameter. Use Eclipse Even you have a favorite editor or IDE you have used for years use Eclipse for Android development. It is good enough as an IDE..
Android singleTask or singleInstance launch mode? http://stackoverflow.com/questions/3219726/android-singletask-or-singleinstance-launch-mode activities above it in the stack. If it does it is not in position to handle the intent and the intent is dropped. Even though the intent is dropped its arrival would have caused the task to come to the foreground where it would remain. Since..
How to change font face of Webview in Android? http://stackoverflow.com/questions/3900658/how-to-change-font-face-of-webview-in-android webview's default font to a custom font Thanks android webview font face custom font share improve this question Even simpler you can use the Asset URL format to reference the font. No programming needed @font face font family 'myface' src..
The connection to adb is down and a sever error has occured http://stackoverflow.com/questions/4072706/the-connection-to-adb-is-down-and-a-sever-error-has-occured connection to adb is down and a sever error has occured I've spent days trying to launch any Android program. Even Hello World gives me the same error The connection to adb is down and a severe error has occured . I'm running Eclipse Galileo..
Custom notification layouts and text colors http://stackoverflow.com/questions/4867338/custom-notification-layouts-and-text-colors up fine but the one that uses a custom layout is hard to read because the text is black instead of the default white. Even the official documentation just sets a #000 color for a TextView so I couldn't find any pointers there. A user was kind.. to create the standard notification object and then traverse the default contentView created by Notification.setLatestEventInfo ... . When you find the right TextView just get the tv.getTextColors .getDefaultColor . Here's the code that extracts.. private void extractColors if notification_text_color null return try Notification ntf new Notification ntf.setLatestEventInfo this COLOR_SEARCH_RECURSE_TIP Utest null LinearLayout group new LinearLayout this ViewGroup event ViewGroup ntf.contentView.apply..
Android: failed to allocate memory http://stackoverflow.com/questions/5969067/android-failed-to-allocate-memory noted in some of the comments below may allow your device to be launched however it doesn't actually have 2 GB of RAM. Even with a 4.1 Emulator the RAM Size is at 512 MB. Recommendation Please use an actual device for testing. share improve this..
Admob implementation Error http://stackoverflow.com/questions/7947165/admob-implementation-error AdActivity declared in AndroidManifest.xml with configChanges. error message after integrating the latest AdMob SDK. Even though I have found this and the other two related discussions see links at the bottom of this article at StackOverflow..
ViewPager and fragments ??what's the right way to store fragment's state? http://stackoverflow.com/questions/7951730/viewpager-and-fragments-whats-the-right-way-to-store-fragments-state FragmentPagerAdapter and is why it is usual to have your fragment initialisation code inside the getItem int method. Even if we were not using a FragmentPagerAdapter it is not a good idea to create a new fragment every single time in Activity.onCreate..
Android REST client, Sample? http://stackoverflow.com/questions/8267928/android-rest-client-sample REST client Sample Even if this thread has accepted answer feel free to propose other ideas you do use or like I've met these articles Restful API..
support FragmentPagerAdapter holds reference to old fragments http://stackoverflow.com/questions/9727173/support-fragmentpageradapter-holds-reference-to-old-fragments put your app into the background the fragments that have been added to the fragment manager are saved automatically. Even if your app is killed this information is restored when you relaunch your app. Now consider that you have viewed a few pages..
|