¡@

Home 

2014/10/16 ¤W¤È 08:26:20

android Programming Glossary: there's

Android, How to manage start activity for result?

http://stackoverflow.com/questions/10407159/android-how-to-manage-start-activity-for-result

Close/hide the Android Soft Keyboard

http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard

Button I want to hide the virtual keyboard. I assume that there's a simple one or two liner to make this happen. Where can I find..

What Android tools and methods work best to find memory/resource leaks?

http://stackoverflow.com/questions/1147172/what-android-tools-and-methods-work-best-to-find-memory-resource-leaks

have to be some memory and resource leaks in there and there's only 16mb of heap on the Android and its apparently surprisingly..

How to avoid reverse engineering of an APK file?

http://stackoverflow.com/questions/13854425/how-to-avoid-reverse-engineering-of-an-apk-file

in my APK file As everyone says and as you probably know there's no 100 security. But the place to start for Android that Google..

How to check internet access on Android? InetAddress never timeouts

http://stackoverflow.com/questions/1560788/how-to-check-internet-access-on-android-inetaddress-never-timeouts

in airplane mode or presumably in other situations where there's no available network cm.getActiveNetworkInfo will be null so..

handle textview link click in my android app

http://stackoverflow.com/questions/1697084/handle-textview-link-click-in-my-android-app

best way I'd like to know how that is done but I'm hoping there's an easier way to just say when a link is clicked in this textview.. improve this question Coming at this almost a year later there's a different manner in which I solved my particular problem...

java.lang.OutOfMemoryError: bitmap size exceeds VM budget - Android

http://stackoverflow.com/questions/1949066/java-lang-outofmemoryerror-bitmap-size-exceeds-vm-budget-android

removes callbacks when your application redraws but again there's not enough information here to say for sure. share improve..

BitmapFactory OOM driving me nuts

http://stackoverflow.com/questions/1955410/bitmapfactory-oom-driving-me-nuts

or an explanation as to why VM won't allocate 614KB when there's 1.6MB of free memory android oom share improve this question..

How to get the Android device's primary e-mail address

http://stackoverflow.com/questions/2112965/how-to-get-the-android-devices-primary-e-mail-address

of e mail addresses It's my understanding that on OS 2.0 there's support for multiple e mail addresses but below 2.0 you can..

Clicking URLs opens default browser

http://stackoverflow.com/questions/2378800/clicking-urls-opens-default-browser

method . If you look at the WebView sample in the SDK there's an example which does just what you want. It's as simple as..

ListView item background via custom selector

http://stackoverflow.com/questions/2562051/listview-item-background-via-custom-selector

this myself and finally solved it. As Romain Guy hinted to there's another state android state_selected that you must use. Use..

Detect application heap size in Android

http://stackoverflow.com/questions/2630158/detect-application-heap-size-in-android

application heap size available to an Android app I heard there's a function that does this in later versions of the SDK. In any..

Launch custom android application from android browser

http://stackoverflow.com/questions/2958701/launch-custom-android-application-from-android-browser

app installed they'll get a nasty error. And I'm not sure there's any way to check. Edit To answer your question you can use getIntent..

Android Lock Screen Widget

http://stackoverflow.com/questions/4116001/android-lock-screen-widget

okay. If you're trying to create a custom lock screen then there's a lot of unusual interactions on all the different android platforms...

Android - SMS Broadcast receiver

http://stackoverflow.com/questions/4117701/android-sms-broadcast-receiver

I cannot find where I am doing wrong. I'm not sure if there's something wrong with the code or debugging. I'm trying to be..

Android and XMPP: Currently available solutions

http://stackoverflow.com/questions/4769020/android-and-xmpp-currently-available-solutions

are using their own patched version of aSMACK. Finally there's aSMACK but that too hasn't been updated for quite some time..

Programmatically register a broadcast receiver

http://stackoverflow.com/questions/4805269/programmatically-register-a-broadcast-receiver

is done through the manifest file I'm wondering if there's a proper way to achieve this in code. Thank you Kr Miloud B...

What is the most appropriate way to store user settings in Android application

http://stackoverflow.com/questions/785973/what-is-the-most-appropriate-way-to-store-user-settings-in-android-application

other applications from being able to access the values so there's some security there but physical access to a phone could potentially..

Android MediaPlayer works fine in Custom audio Streaming application up to Android 2.1 but not in higher versions

http://stackoverflow.com/questions/8671479/android-mediaplayer-works-fine-in-custom-audio-streaming-application-up-to-andro

stack trace don't map to the file you link to so I assume there's a different version that you're actually using. I'm going to..

Changing the background drawable of the searchview widget

http://stackoverflow.com/questions/11085308/changing-the-background-drawable-of-the-searchview-widget

attribute is set we investigate res values themes.xml . There's a group of attributes related to SearchView in default Theme..

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

look at the hierachyviewer Located in the tools directory There's the DecorView and a LinearLayout as a child. This LinearLayout..

How to delete files created by the application on uninstall?

http://stackoverflow.com/questions/1222269/how-to-delete-files-created-by-the-application-on-uninstall

device android uninstall share improve this question There's no way for your application to know that it is being uninstalled..

Source of Android's lock screen

http://stackoverflow.com/questions/2140964/source-of-androids-lock-screen

policy src com android internal policy impl keyguard . There's a mirror on GitHub you can look at online I pegged this link..

What is the correct way to specify dimensions in DIP from Java code?

http://stackoverflow.com/questions/2238883/what-is-the-correct-way-to-specify-dimensions-in-dip-from-java-code

float 123.4 getResources .getDisplayMetrics There's a list of other types that you can use with it including COMPLEX_UNIT_SP..

How can I avoid garbage collection delays in Java games? (Best Practices) [closed]

http://stackoverflow.com/questions/2484079/how-can-i-avoid-garbage-collection-delays-in-java-games-best-practices

creating them in your main game loop in the first place. There's no clean way to deal with this and I'll first give an example.....

Android: How to create a Dialog without a title?

http://stackoverflow.com/questions/2644134/android-how-to-create-a-dialog-without-a-title

improve this question You need to use an AlertDialog . There's a good explanation on the Android Developer's site about custom..

How to load a Java class dynamically on android/dalvik?

http://stackoverflow.com/questions/3022454/how-to-load-a-java-class-dynamically-on-android-dalvik

android classloader dalvik share improve this question There's an example of DexClassLoader in the Dalvik test suite. It accesses..

Android: OutofMemoryError: bitmap size exceeds VM budget with no reason I can see

http://stackoverflow.com/questions/3037027/android-outofmemoryerror-bitmap-size-exceeds-vm-budget-with-no-reason-i-can-se

question I think there's nothing special in your case. There's just not enough memory. You can't have several 600x800 bitmaps..

onActivityResult() called prematurely

http://stackoverflow.com/questions/3354955/onactivityresult-called-prematurely

android activity share improve this question There's a bug feature in Android which immediately reports result which..

How do I prevent an Android device from going to sleep programmatically?

http://stackoverflow.com/questions/3723634/how-do-i-prevent-an-android-device-from-going-to-sleep-programmatically

..screen will stay on during this section.. wl.release There's also a table on this page that describes the different kinds..

Bulk Insertion on Android device

http://stackoverflow.com/questions/3860008/bulk-insertion-on-android-device

use Insert statements I should wrap them in a transaction. There's also a post about using your own database but I need this data..

FFMPEG on Android

http://stackoverflow.com/questions/4725773/ffmpeg-on-android

wrapping ffmpeg functionality using the Android NDK . There's a lot of documentation out there on how to work with the NDK... ffmpeg wrapping dynamic library from your java sources. There's enough documentation on JNI out there you should be fine. Regarding..

Android and XMPP: Currently available solutions

http://stackoverflow.com/questions/4769020/android-and-xmpp-currently-available-solutions

although I have not tried it yet in a real application . There's also another solution I came across Beem's aSMACK library ...

Create a NinePatch/NinePatchDrawable in runtime

http://stackoverflow.com/questions/5079868/create-a-ninepatch-ninepatchdrawable-in-runtime

and Res_png_9patch serialize in ResourceTypes.cpp. There's also a home made npTc chunk reader from Dmitry Skiba. I can't..

Why does ContentResolver.requestSync not trigger a sync?

http://stackoverflow.com/questions/5253858/why-does-contentresolver-requestsync-not-trigger-a-sync

synced to the server as rapidly as possible. Also awesome. There's one edge case though. If you pull from the server and push an..

How do I set up IntelliJ IDEA for Android applications?

http://stackoverflow.com/questions/5271182/how-do-i-set-up-intellij-idea-for-android-applications

a tutorial here Enter the name choose Android type. There's a step missing in the tutorial when you are asked to choose..

How can I use speech recognition without the annoying dialog in android phones

http://stackoverflow.com/questions/6316937/how-can-i-use-speech-recognition-without-the-annoying-dialog-in-android-phones

modify the android APIs I've found a article about this. There's one a comment that I should do modifications to the android..

downloading and importing android source code to be able to compile and edit

http://stackoverflow.com/questions/6613778/downloading-and-importing-android-source-code-to-be-able-to-compile-and-edit

android eclipse source mms share improve this question There's a mirror at https github.com android share improve this answer..

Android, How to manage start activity for result?

http://stackoverflow.com/questions/10407159/android-how-to-manage-start-activity-for-result

Close/hide the Android Soft Keyboard

http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard

layout. After writing in the edit field and clicking on the Button I want to hide the virtual keyboard. I assume that there's a simple one or two liner to make this happen. Where can I find an example of it android keyboard android softkeyboard..

What Android tools and methods work best to find memory/resource leaks?

http://stackoverflow.com/questions/1147172/what-android-tools-and-methods-work-best-to-find-memory-resource-leaks

you want to declare victory and ship but you know there just have to be some memory and resource leaks in there and there's only 16mb of heap on the Android and its apparently surprisingly easy to leak in an Android app. I've been looking around..

How to avoid reverse engineering of an APK file?

http://stackoverflow.com/questions/13854425/how-to-avoid-reverse-engineering-of-an-apk-file

even impossible What more can I do to protect the source code in my APK file As everyone says and as you probably know there's no 100 security. But the place to start for Android that Google has built in is ProGuard. If you have the option of including..

How to check internet access on Android? InetAddress never timeouts

http://stackoverflow.com/questions/1560788/how-to-check-internet-access-on-android-inetaddress-never-timeouts

@Eddie. Just a minor edit to your solution if the device is in airplane mode or presumably in other situations where there's no available network cm.getActiveNetworkInfo will be null so you need to add a null check. Modified solution below public..

handle textview link click in my android app

http://stackoverflow.com/questions/1697084/handle-textview-link-click-in-my-android-app

would let my app handle that protocol. If this is indeed the best way I'd like to know how that is done but I'm hoping there's an easier way to just say when a link is clicked in this textview I want to raise an event that receives the href value.. of the link as an input parameter android textview share improve this question Coming at this almost a year later there's a different manner in which I solved my particular problem. Since I wanted the link to be handled by my own app there is..

java.lang.OutOfMemoryError: bitmap size exceeds VM budget - Android

http://stackoverflow.com/questions/1949066/java-lang-outofmemoryerror-bitmap-size-exceeds-vm-budget-android

BitmapFactory OOM driving me nuts

http://stackoverflow.com/questions/1955410/bitmapfactory-oom-driving-me-nuts

avoid using BitmapFactory . Anyone have any ideas on this or an explanation as to why VM won't allocate 614KB when there's 1.6MB of free memory android oom share improve this question Note that as CommonsWare points out below the whole approach..

How to get the Android device's primary e-mail address

http://stackoverflow.com/questions/2112965/how-to-get-the-android-devices-primary-e-mail-address

How do you get the Android's primary e mail address or a list of e mail addresses It's my understanding that on OS 2.0 there's support for multiple e mail addresses but below 2.0 you can only have one e mail address per device. android share improve..

Clicking URLs opens default browser

http://stackoverflow.com/questions/2378800/clicking-urls-opens-default-browser

set the WebViewClient of your WebView using the setWebViewClient method . If you look at the WebView sample in the SDK there's an example which does just what you want. It's as simple as private class HelloWebViewClient extends WebViewClient @Override..

ListView item background via custom selector

http://stackoverflow.com/questions/2562051/listview-item-background-via-custom-selector

share improve this question I've been frustrated by this myself and finally solved it. As Romain Guy hinted to there's another state android state_selected that you must use. Use a state drawable for the background of your list item and use..

Detect application heap size in Android

http://stackoverflow.com/questions/2630158/detect-application-heap-size-in-android

heap size in Android How do you programmatically detect the application heap size available to an Android app I heard there's a function that does this in later versions of the SDK. In any case I'm looking for solution that works for 1.5 and upwards...

Launch custom android application from android browser

http://stackoverflow.com/questions/2958701/launch-custom-android-application-from-android-browser

only downside to this is that if the user doesn't have the app installed they'll get a nasty error. And I'm not sure there's any way to check. Edit To answer your question you can use getIntent .getData which returns a Uri object. You can then use..

Android Lock Screen Widget

http://stackoverflow.com/questions/4116001/android-lock-screen-widget

while music is playing or similar you'll probably mostly be okay. If you're trying to create a custom lock screen then there's a lot of unusual interactions on all the different android platforms. Help I can't turn off my alarm without rebooting my..

Android - SMS Broadcast receiver

http://stackoverflow.com/questions/4117701/android-sms-broadcast-receiver

trying to get this program to work but so far having no luck. I cannot find where I am doing wrong. I'm not sure if there's something wrong with the code or debugging. I'm trying to be notified if a new SMS arrives. Here is my program package Technicaljar.SMSBroadcastReceiver..

Android and XMPP: Currently available solutions

http://stackoverflow.com/questions/4769020/android-and-xmpp-currently-available-solutions

new XMPP client for android and from what I understand they are using their own patched version of aSMACK. Finally there's aSMACK but that too hasn't been updated for quite some time as the site suggests . Do you have any other suggestions or..

Programmatically register a broadcast receiver

http://stackoverflow.com/questions/4805269/programmatically-register-a-broadcast-receiver

specific receivers according to user choice. As the registration is done through the manifest file I'm wondering if there's a proper way to achieve this in code. Thank you Kr Miloud B. android broadcastreceiver share improve this question It..

What is the most appropriate way to store user settings in Android application

http://stackoverflow.com/questions/785973/what-is-the-most-appropriate-way-to-store-user-settings-in-android-application

application's SharedPreferences are sandboxed to prevent other applications from being able to access the values so there's some security there but physical access to a phone could potentially allow access to the values. If possible I'd consider..

Android MediaPlayer works fine in Custom audio Streaming application up to Android 2.1 but not in higher versions

http://stackoverflow.com/questions/8671479/android-mediaplayer-works-fine-in-custom-audio-streaming-application-up-to-andro

is acting differently in this case. The line numbers in your stack trace don't map to the file you link to so I assume there's a different version that you're actually using. I'm going to guess that that NullPointerException is being reported by MediaPlayer..

Changing the background drawable of the searchview widget

http://stackoverflow.com/questions/11085308/changing-the-background-drawable-of-the-searchview-widget

is it easily settable To check how searchViewTextField attribute is set we investigate res values themes.xml . There's a group of attributes related to SearchView in default Theme style name Theme ...other attributes present here... SearchView..

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

Even without implementing your own ActionBar. Just have a look at the hierachyviewer Located in the tools directory There's the DecorView and a LinearLayout as a child. This LinearLayout contains both the ActionBar and the other content. So you..

How to delete files created by the application on uninstall?

http://stackoverflow.com/questions/1222269/how-to-delete-files-created-by-the-application-on-uninstall

to delete all files when the user runs uninstall on android device android uninstall share improve this question There's no way for your application to know that it is being uninstalled without modifying the kernel . All files created in the..

Source of Android's lock screen

http://stackoverflow.com/questions/2140964/source-of-androids-lock-screen

. As of Android 4.2 the keyguard source is at frameworks base policy src com android internal policy impl keyguard . There's a mirror on GitHub you can look at online I pegged this link to the JB MR 1.1 release in case the location changes again..

What is the correct way to specify dimensions in DIP from Java code?

http://stackoverflow.com/questions/2238883/what-is-the-correct-way-to-specify-dimensions-in-dip-from-java-code

int value int TypedValue.applyDimension TypedValue.COMPLEX_UNIT_DIP float 123.4 getResources .getDisplayMetrics There's a list of other types that you can use with it including COMPLEX_UNIT_SP COMPLEX_UNIT_PT all found in the page I linked..

How can I avoid garbage collection delays in Java games? (Best Practices) [closed]

http://stackoverflow.com/questions/2484079/how-can-i-avoid-garbage-collection-delays-in-java-games-best-practices

another and shall kill your game's perfs is simply to avoid creating them in your main game loop in the first place. There's no clean way to deal with this and I'll first give an example... Typically you have say 4 balls on screen at 50 25 70 32..

Android: How to create a Dialog without a title?

http://stackoverflow.com/questions/2644134/android-how-to-create-a-dialog-without-a-title

my dialog layout. android android layout dialog share improve this question You need to use an AlertDialog . There's a good explanation on the Android Developer's site about custom dialogs . In very short summary you do this with code like..

How to load a Java class dynamically on android/dalvik?

http://stackoverflow.com/questions/3022454/how-to-load-a-java-class-dynamically-on-android-dalvik

can anyone provide reasons why this is not possible java android classloader dalvik share improve this question There's an example of DexClassLoader in the Dalvik test suite. It accesses the classloader reflectively but if you're building against..

Android: OutofMemoryError: bitmap size exceeds VM budget with no reason I can see

http://stackoverflow.com/questions/3037027/android-outofmemoryerror-bitmap-size-exceeds-vm-budget-with-no-reason-i-can-se

gallery imageview outofmemoryerror ddms share improve this question I think there's nothing special in your case. There's just not enough memory. You can't have several 600x800 bitmaps in memory they consume too much memory. You should save them..

onActivityResult() called prematurely

http://stackoverflow.com/questions/3354955/onactivityresult-called-prematurely

PreferenceActivity Or how else can this premature call be explained android activity share improve this question There's a bug feature in Android which immediately reports result which has not been set yet for activity declared as singleTask..

How do I prevent an Android device from going to sleep programmatically?

http://stackoverflow.com/questions/3723634/how-do-i-prevent-an-android-device-from-going-to-sleep-programmatically

PowerManager.SCREEN_DIM_WAKE_LOCK My Tag wl.acquire ..screen will stay on during this section.. wl.release There's also a table on this page that describes the different kinds of wakelocks. Be aware that some caution needs to be taken..

Bulk Insertion on Android device

http://stackoverflow.com/questions/3860008/bulk-insertion-on-android-device

way to do this From various posts I know that if I use Insert statements I should wrap them in a transaction. There's also a post about using your own database but I need this data to go into my app's standard Android database. Note that..

FFMPEG on Android

http://stackoverflow.com/questions/4725773/ffmpeg-on-android

as ffmpeg libraries depend on them. Create a dynamic library wrapping ffmpeg functionality using the Android NDK . There's a lot of documentation out there on how to work with the NDK. Basically you'll need to write some C C code to export the.. libavcodec libavformat libavutil libc libz Use the ffmpeg wrapping dynamic library from your java sources. There's enough documentation on JNI out there you should be fine. Regarding using ffmpeg for playback there are many examples the..

Android and XMPP: Currently available solutions

http://stackoverflow.com/questions/4769020/android-and-xmpp-currently-available-solutions

a little research it seems it might work just fine nowadays although I have not tried it yet in a real application . There's also another solution I came across Beem's aSMACK library . Beem is a fairly new XMPP client for android and from what I..

Create a NinePatch/NinePatchDrawable in runtime

http://stackoverflow.com/questions/5079868/create-a-ninepatch-ninepatchdrawable-in-runtime

would start by looking at do_9patch isNinePatchChunk Res_png_9patch and Res_png_9patch serialize in ResourceTypes.cpp. There's also a home made npTc chunk reader from Dmitry Skiba. I can't post links so if someone can edit my answer that would be..

Why does ContentResolver.requestSync not trigger a sync?

http://stackoverflow.com/questions/5253858/why-does-contentresolver-requestsync-not-trigger-a-sync

schedule so that those changes get taken off the device and synced to the server as rapidly as possible. Also awesome. There's one edge case though. If you pull from the server and push an update into the ContentProvider it will dutifully call notifyChange..

How do I set up IntelliJ IDEA for Android applications?

http://stackoverflow.com/questions/5271182/how-do-i-set-up-intellij-idea-for-android-applications

to finish. New Project Run IntelliJ Create a new project there's a tutorial here Enter the name choose Android type. There's a step missing in the tutorial when you are asked to choose the JDK before choosing the SDK you need to choose the Java..

How can I use speech recognition without the annoying dialog in android phones

http://stackoverflow.com/questions/6316937/how-can-i-use-speech-recognition-without-the-annoying-dialog-in-android-phones

annoying dialog in android phones Is this possible without modify the android APIs I've found a article about this. There's one a comment that I should do modifications to the android APIs. But it didn't say how to do the modification. Can anybody..

downloading and importing android source code to be able to compile and edit

http://stackoverflow.com/questions/6613778/downloading-and-importing-android-source-code-to-be-able-to-compile-and-edit