protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent cameraIntent = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA);
//Intent cameraIntent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
//cameraIntent.putExtra(
// MediaStore.EXTRA_OUTPUT, (new File(Environment.getExternalStorageDirectory(),
// String.valueOf(System.currentTimeMillis()) + ".jpg"))
//);
startActivityForResult(cameraIntent, 3220);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(requestCode == 3220){
Log.d("ank", "activity");
}
Log.d("ank", "activity1");
}
当我使用Intent_ACTION_VIDEO_CAMERA或Intent_Action_Still_Image_Camera
时,我无法获得onActivityResult当我使用Action_Image_Capture时,我会调用onActivityResult。
我只想使用上面两个Intent因为使用Action_Image_Camera视频选项时不来
答案 0 :(得分:0)
当我使用Intent_ACTION_VIDEO_CAMERA或Intent_Action_Still_Image_Camera
时,我无法获得onActivityResult
记录INTENT_ACTION_STILL_IMAGE_CAMERA
和INTENT_ACTION_VIDEO_CAMERA
都不会返回结果。我希望支持这些Intent
操作的大多数应用都不会返回结果。