Problem with access to camera from application

722

0

2017-11-21 16:33

Hi!
One of our user on Meizu device get an error in our application when he's trying record video from camera app:
  1. 11-20 12:20:45.221: E/AndroidRuntime(7104): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.meizu.media.camera/com.meizu.media.camera.CameraActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'long android.os.Bundle.getLong(java.lang.String)' on a null object reference
  2. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677)
  3. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2747)
  4. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at android.app.ActivityThread.access$900(ActivityThread.java:187)
  5. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584)
  6. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at android.os.Handler.dispatchMessage(Handler.java:111)
  7. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at android.os.Looper.loop(Looper.java:194)
  8. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at android.app.ActivityThread.main(ActivityThread.java:5877)
  9. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at java.lang.reflect.Method.invoke(Native Method)
  10. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at java.lang.reflect.Method.invoke(Method.java:372)
  11. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1015)
  12. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:810)
  13. 11-20 12:20:45.221: E/AndroidRuntime(7104): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'long android.os.Bundle.getLong(java.lang.String)' on a null object reference
  14. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at com.meizu.media.camera.d.q.av(VideoMode.java:1292)
  15. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at com.meizu.media.camera.d.q.<init>(VideoMode.java:183)
  16. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at com.meizu.media.camera.d.q.<init>(VideoMode.java:190)
  17. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at com.meizu.media.camera.d.e.a(CameraModeFactory.java:36)
  18. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at com.meizu.media.camera.o.bm(MzCamModule.java:1418)
  19. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at com.meizu.media.camera.o.a(MzCamModule.java:1514)
  20. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at com.meizu.media.camera.CameraActivity.onCreate(CameraActivity.java:481)
  21. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at android.app.Activity.performCreate(Activity.java:6127)
  22. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1128)
  23. 11-20 12:20:45.221: E/AndroidRuntime(7104):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2630)
Copy the Code


It's worked on all other devices. I'm calling camera like this:
  1. Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
  2. if (takeVideoIntent.resolveActivity(getPackageManager()) != null) {
  3.     startActivityForResult(takeVideoIntent, REQUEST_VIDEO_CAPTURE);
  4. }
Copy the Code
Does it need something special for calling camera for Meizu?

Device: Meizu M2, os: FlyME 6