Manifest(这里我的CameraApp可以被另一个(例如电报)应用程序使用意图调用):
<?xml version="1.0" encoding="utf-8"?>
<intent-filter>
<action android:name="android.media.action.VIDEO_CAPTURE"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
我想通过EXTRA_OUTPUT返回录制的视频(Uri或文件)???信使。我想从使者那里得到这样的东西:(例如照片)
f = new File(str_Camera_Photo_ImagePath);
startActivityForResult(new Intent(
MediaStore.ACTION_IMAGE_CAPTURE).putExtra(
MediaStore.EXTRA_OUTPUT, Uri.fromFile(f)),
Take_Photo);
System.err.println("f " + f);
答案 0 :(得分:0)
private fun finishWithResult() {
val sendVideoIntent = Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE)
sendVideoIntent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, Uri.fromFile(File(mVideoFileName)))
setResult(Activity.RESULT_OK, sendVideoIntent)
sendBroadcast(sendVideoIntent)
//TODO finish()
}