Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/215.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 三星s4中的活动结果摄像机意图返回空值_Android_Android Intent_Camera - Fatal编程技术网

Android 三星s4中的活动结果摄像机意图返回空值

Android 三星s4中的活动结果摄像机意图返回空值,android,android-intent,camera,Android,Android Intent,Camera,提前谢谢你的帮助。以下是我在创建第一个应用程序时面临的问题 我正在制作一个应用程序,在这个应用程序中,用户可以选择从图库或相机中拍摄图像,当从图库导入图像时,应用程序可以按需要工作,但当从相机中拍摄图像时,intent返回null Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ou


提前谢谢你的帮助。以下是我在创建第一个应用程序时面临的问题

我正在制作一个应用程序,在这个应用程序中,用户可以选择从图库或相机中拍摄图像,当从图库导入图像时,应用程序可以按需要工作,但当从相机中拍摄图像时,
intent
返回
null

Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
startActivityForResult(cameraIntent,YOUR_SELECT_PICTURE_REQUEST_CODE);

将帮助您吗?什么是“the
intent
返回
null
”意思?谢谢!经过数小时的搜索,这一切都成功了。我很想知道为什么。你能告诉我在文档中我可以在哪里找到更多信息吗?
<activity
            android:name="com.example.AddPhotoActivity"
            android:label="Add Photo"
             android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
          >
android:configChanges="orientation|screenSize"