启动:
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
Log.d(TAG, "click() called "+Utils.PATH);
intent.putExtra(MediaStore.EXTRA_OUTPUT,Utils.PATH);
intent.putExtra(android.provider.MediaStore.EXTRA_DURATION_LIMIT, 120000);
startActivityForResult(intent, 111);
返回 onActivityResult:
if (data.getData() != null && "content".equals(data.getData().getScheme())) {
Cursor cursor = this
.getContentResolver()
.query(data.getData(),
new String[] { android.provider.MediaStore.Video.VideoColumns.DATA },
null, null, null);
cursor.moveToFirst();
Log.d(TAG, "onActivityResult: "+cursor.getString(0));
cursor.close();
© 著作权归作者所有
文章评论(0)