我正在尝试使用Android Camera API从后置摄像头捕获图像。
我正在使用this代码,4。教程:使用相机API。它在使用前置摄像头时有效。当我将CAMERA_FACING_FRONT
更改为CAMERA_FACING_BACK
时,我会在
camera.takePicture(null, null, new PhotoHandler(getApplicationContext()));
我正在使用三星Galaxy S3。谁知道如何解决这个问题?已被多次询问,但我没有在任何地方找到真正的解决方案。
程序本身没有例外,错误日志:
03-19 01:57:43.069 2348-7984/? E/DatabaseUtils﹕ Writing exception to parcel
java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:13140)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2038)
at com.android.providers.settings.SettingsProvider.callFromPackage(SettingsProvider.java:607)
at android.content.ContentProvider$Transport.call(ContentProvider.java:279)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:273)
at android.os.Binder.execTransact(Binder.java:388)
at dalvik.system.NativeStart.run(Native Method)
03-19 01:57:57.874 2348-2689/? E/Watchdog﹕ !@Sync 13376
03-19 01:57:59.734 18504-18557/? A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 18557 (pictureThread)
03-19 01:58:01.984 22720-22720/? E/ctxmgr﹕ [PowerConnectionProducer]Could not write powerInfo=Plug state: 2 BatteryLevel: 0.98, status=Status{statusCode=unknown status code: 7503, resolution=null}
03-19 01:58:07.239 18489-18489/com.example.luka.udpklijentandroid E/Camera﹕ Error 100
03-19 01:58:07.679 18607-18607/? E/TinyUCM﹕ 23.29: This output device support only one mic
03-19 01:58:07.679 18607-18607/? E/TinyUCM﹕ 24.32: This output device support only one mic
03-19 01:58:07.679 18607-18607/? E/TinyUCM﹕ 25.31: This output device support only one mic
03-19 01:58:07.679 18607-18607/? E/TinyUCM﹕ 26.40: This output device support only one mic
03-19 01:58:07.679 18607-18607/? E/TinyUCM﹕ 27.28: This output device support only one mic
03-19 01:58:07.679 18607-18607/? E/TinyUCM﹕ 28.35: This output device support only one mic
03-19 01:58:08.734 2348-2565/? E/AudioService﹕ Media server died.
03-19 01:58:08.734 2348-2565/? E/AudioService﹕ Media server started.
03-19 01:58:27.879 2348-2689/? E/Watchdog﹕ !@Sync 13377