我想实现VideoRecording功能。我有下面的代码,但它会引发这个错误。我该如何纠正它。ActivityNotFoundException将使用摄像机。(android.media.action.VIDEO_CAMERA)
这里是我的代码,
Intent cameraIntent = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA);
cameraIntent.putExtra("android.intent.extra.durationLimit", 30);
startActivityForResult(cameraIntent,TAKE_PICTURE_WITH_CAMERA);
logcat的详细
07-28 11:59:22.271: ERROR/AndroidRuntime(5590): Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.media.action.VIDEO_CAMERA (has extras) }
07-28 11:59:22.271: ERROR/AndroidRuntime(5590): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
07-28 11:59:22.271: ERROR/AndroidRuntime(5590): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
07-28 11:59:22.271: ERROR/AndroidRuntime(5590): at android.app.Activity.startActivityForResult(Activity.java:2817)
如果我仍然使用它,我无法限制我的持续时间。你有什么想法 –