vianziro / droidar

Automatically exported from code.google.com/p/droidar
0 stars 0 forks source link

Check if camera is available before using it #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Find way to avoid:

java.lang.RuntimeException: Fail to connect to camera service
at android.hardware.Camera.native_setup(Native Method)
at android.hardware.Camera.<init>(Camera.java:258)
at android.hardware.Camera.open(Camera.java:235)
at system.CameraView.surfaceCreated(CameraView.java:39)
at android.view.SurfaceView.updateWindow(SurfaceView.java:543)
at android.view.SurfaceView.dispatchDraw(SurfaceView.java:348)
at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.View.draw(View.java:6883)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.View.draw(View.java:6883)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at 
com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:186
2)
at android.view.ViewRoot.draw(ViewRoot.java:1522)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1258)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)

Original issue reported on code.google.com by simon.heinen on 1 Sep 2011 at 10:01

GoogleCodeExporter commented 8 years ago
To me it is the same in the emulator and the device, I have an interface with 
the trace red

Original comment by manuel.z...@taisachile.cl on 26 Sep 2011 at 9:45

Attachments:

GoogleCodeExporter commented 8 years ago
If this happens repeatedly, please tell me which phone and rom you are using, 
because normally this should not happen very often.

Original comment by simon.heinen on 26 Sep 2011 at 9:50

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
As expected bad was my problem declaration permits must be outside the 
application tag, sorry I'm newbie, thanks for your attention:)

Original comment by mfza...@gmail.com on 27 Sep 2011 at 1:00

GoogleCodeExporter commented 8 years ago
hi everybody.
thank s a lot for the framework.
i have the same problem like yours. did u fix it? 
tank you for replay

Original comment by amine.ah...@gmail.com on 28 Nov 2012 at 9:27