在android2.1中 用已下命令毫无问题
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, 1);
<intent-filter>
<action android:name="android.media.action.IMAGE_CAPTURE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>但在 android2.2中 用同样的代码 却失效,运行时提示错误。请问如果解决 ?
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, 1);
<intent-filter>
<action android:name="android.media.action.IMAGE_CAPTURE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>但在 android2.2中 用同样的代码 却失效,运行时提示错误。请问如果解决 ?
intent.putExtra( MediaStore.EXTRA_OUTPUT, Uri.fromFile( new File(strCaptureFilePath) ) );
intent.putExtra( MediaStore.EXTRA_SCREEN_ORIENTATION, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
startActivityForResult(intent, REQUEST_CAMERA);2.1~2.3都是正常的啊
02-24 14:26:08.175: E/AndroidRuntime(1258): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:760)
02-24 14:26:08.175: E/AndroidRuntime(1258): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:916)
但我这运行的时候就报这个错误。
用android2.1相同代码 就没问题。这是怎么回事呢?2.2xml 也配置了啊?求解