How to mount the microSD disk programmatically?

by Dianne Hackborn » Fri, 06 Mar 2009 11:36:18 GMT


Sponsored Links
 It's not an application doing it, it's the system itself.  So sorry, there
is no API for it at this point.







> 



Other Threads

1. How to use GridView ?

hi all,


i want to design Grid View in which i can add different type of views
like WebView, ImageView .
is it possible? and if yes how to do that?


thanks in advance,
Prashant
--~--~---------~--~----~------------~-------~--~----~

2. Proper way of handling orientation change + async thread

hi,

my app has a search function which when a button is clicked, it
creates a new dialog and then start a new background thread that
performs an asynchronous http request, when the http request is
finished, the background thread cancels the dialog and the data is
displayed on screen.

I notice however, if i change the orientation of the screen while the
background thread is running, the app will crash. The error log shows
the following:

W/dalvikvm(  292): threadid=3: thread exiting with uncaught exception
(group=0x40010e28)
E/AndroidRuntime(  292): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  292): java.lang.IllegalArgumentException: View not
attached to window manager
E/AndroidRuntime(  292):        at
android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:
331)
E/AndroidRuntime(  292):        at
android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200)
E/AndroidRuntime(  292):        at android.view.Window
$LocalWindowManager.removeView(Window.java:401)
E/AndroidRuntime(  292):        at
android.app.Dialog.dismissDialog(Dialog.java:249)
E/AndroidRuntime(  292):        at android.app.Dialog.access
$000(Dialog.java:59)
E/AndroidRuntime(  292):        at android.app.Dialog
$1.run(Dialog.java:93)
E/AndroidRuntime(  292):        at
android.app.Dialog.dismiss(Dialog.java:233)
E/AndroidRuntime(  292):        at
android.app.Dialog.cancel(Dialog.java:838)
E/AndroidRuntime(  292):        at com.yellowbook.android2.SearchHelper
$3.handleMessage(SearchHelper.java:97)
E/AndroidRuntime(  292):        at
android.os.Handler.dispatchMessage(Handler.java:88)
E/AndroidRuntime(  292):        at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  292):        at
android.app.ActivityThread.main(ActivityThread.java:3742)
E/AndroidRuntime(  292):        at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  292):        at
java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(  292):        at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
E/AndroidRuntime(  292):        at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
E/AndroidRuntime(  292):        at
dalvik.system.NativeStart.main(Native Method)

Does anyone knows a better way to do async processing that wont crash
on orientation change?

Thanks,
--~--~---------~--~----~------------~-------~--~----~

3. pass data between activities

4. Garbage Collection monitoring

5. Where is the android.jar source

6. TextView.SavedState example?

7. Button Resource Invalid?