Camera's SurfaceView can't use

Discussion in 'Android' started by FJUUDOO, Apr 7, 2014.

  1. FJUUDOO

    FJUUDOO New Member

    Joined:
    Feb 17, 2014
    Messages:
    6
    Likes Received:
    0
    Hi,
    We write an app to use camera's SurfaceView .
    We can use it on our phone .
    When we use it on UDOO dual , it always break .
    And it shows "program no response".
    We guess the problem is that we have no permission to use camera.
    When we use the SurfaceView , the program run to "Start.View()" . It beaks .
    Is there have other way to deal this solution ?
     
  2. udoid

    udoid New Member

    Joined:
    Mar 2, 2014
    Messages:
    12
    Likes Received:
    0
    Have you tried running the debugger on it whilst running your app. on the Udoo? What is the output of logcat?
     
  3. delba

    delba Administrator Staff Member

    Joined:
    May 8, 2013
    Messages:
    1,064
    Likes Received:
    9
  4. FJUUDOO

    FJUUDOO New Member

    Joined:
    Feb 17, 2014
    Messages:
    6
    Likes Received:
    0
    Code:
    05-30 14:47:09.844: D/CameraCaptureActivity(797): getCameraInstance()Camera:: null
    05-30 14:47:09.855: D/CameraCaptureActivity(797): getCameraInstance()open:: null
    05-30 14:47:09.855: D/CameraCaptureActivity(797): mCamera:: null
    05-30 14:47:09.895: D/CameraCaptureActivity(797): mCamera :: null
    05-30 14:47:09.895: D/CameraCaptureActivity(797): mSurfaceHolder :: android.view.SurfaceView$4@40d06ef8
    05-30 14:47:09.924: D/CameraCaptureActivity(797): mCameraPreview :: com.example.demo.CameraPreview{40d06860 V.E..... ......I. 0,0-0,0}
    05-30 14:47:09.924: D/CameraCaptureActivity(797): FrameLayout :: android.widget.FrameLayout{40cfa7d8 V.E..... ......I. 0,0-0,0 #7f080000 app:id/camera_preview}
    05-30 14:47:09.954: D/CameraCaptureActivity(797): captureButton :: android.widget.Button{40cfad50 VFED..C. ......I. 0,0-0,0 #7f080001 app:id/button_capture}
    05-30 14:47:04.327: D/AndroidRuntime(797): Shutting down VM
    05-30 14:47:04.327: W/dalvikvm(797): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
    05-30 14:47:04.458: E/AndroidRuntime(797): FATAL EXCEPTION: main
    05-30 14:47:04.458: E/AndroidRuntime(797): java.lang.NullPointerException
    05-30 14:47:04.458: E/AndroidRuntime(797):  at com.example.demo.CameraPreview.surfaceCreated(CameraPreview.java:33)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.view.SurfaceView.updateWindow(SurfaceView.java:569)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.view.SurfaceView.access$000(SurfaceView.java:86)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:174)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:680)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1842)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.view.Choreographer.doCallbacks(Choreographer.java:562)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.view.Choreographer.doFrame(Choreographer.java:532)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.os.Handler.handleCallback(Handler.java:725)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.os.Handler.dispatchMessage(Handler.java:92)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.os.Looper.loop(Looper.java:137)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at android.app.ActivityThread.main(ActivityThread.java:5041)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at java.lang.reflect.Method.invokeNative(Native Method)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at java.lang.reflect.Method.invoke(Method.java:511)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
    05-30 14:47:04.458: E/AndroidRuntime(797):  at dalvik.system.NativeStart.main(Native Method)
    we find the problem is Camera can't catch
     
  5. Suppaman

    Suppaman New Member

    Joined:
    Oct 29, 2013
    Messages:
    25
    Likes Received:
    0
    Is just an hypothesis but remember UDOO have only one camera not two as standard smartphones. These cameras are classified as front-camera and back-camera. It will be possible SurfaceView need to use, for example, front-camera and android UDOO have back-camera only or something similar? The "official" android app detect and show the camera correctly this mean the device is working...
     
  6. FJUUDOO

    FJUUDOO New Member

    Joined:
    Feb 17, 2014
    Messages:
    6
    Likes Received:
    0

    Do you know any example , or any information about it?

    Thanks for your help.
     
  7. Suppaman

    Suppaman New Member

    Joined:
    Oct 29, 2013
    Messages:
    25
    Likes Received:
    0
    Sorry, no example, I just tried to hypotize. In your case the official android camera app is workign as expected?
     
  8. FJUUDOO

    FJUUDOO New Member

    Joined:
    Feb 17, 2014
    Messages:
    6
    Likes Received:
    0
    offcial Android camera app is working as expected.
     
  9. FJUUDOO

    FJUUDOO New Member

    Joined:
    Feb 17, 2014
    Messages:
    6
    Likes Received:
    0
  10. misterdj

    misterdj New Member

    Joined:
    Oct 9, 2014
    Messages:
    9
    Likes Received:
    0
    mismo problema no se hable la camara de la udoo con el surface alguna solucion gracias
     
  11. delba

    delba Administrator Staff Member

    Joined:
    May 8, 2013
    Messages:
    1,064
    Likes Received:
    9
    misterdj please answer in english so the other users can understand you! Cheers
     

Share This Page