My app uses the camera. During development, I constantly do "adb install -r myapp.apk" to install the apk that I just built while my previous build is running on the device. This mostly works fine. However, occasionally, my app has an error while starting up after doing the "adb install" step. I see the following in logcat.
W/CameraService( 91): CameraService::connect X (pid 27676) rejected (camera 1 is still busy). D/AndroidRuntime(27676): Shutting down VM W/dalvikvm(27676): threadid=1: thread exiting with uncaught exception (group=0x40158760) java.lang.RuntimeException: Fail to connect to camera service at android.hardware.Camera.native_setup(Native Method) at android.hardware.Camera.<init>(Camera.java:259) at android.hardware.Camera.open(Camera.java:221) at com.shri.myapp.Cameras.open(Cameras.java:97) If I start the built-in Camera app, it too is unable to use the camera. The only way to fix this is to restart the device. I understand the camera can stay in use if I do not call Camera#release properly. However, shouldn't adb install -r myapp.apk" also release the camera? I see this on both Gingerbread and Honeycomb. My main concern is if this can happen for users and if I should be guarding against it. If it can only happen after "adb install", I can live with that. Shri -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en