我有 MainActivity,我可以在其中启动相机应用程序来拍摄和上传照片。在相机应用程序中长按主页并从最近返回后,我返回相机应用程序。如何始终从最近或启动器图标单击后返回 MainActivity?
我的相机应用意图:
private void showCamera() {
try {
Intent cameraIntent = new Intent(
android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
path = Utils.getOutputMediaFileUri(getApplicationContext());
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, path);
startActivityForResult(cameraIntent, Constant.CAMERA_REQUEST);
} catch (ActivityNotFoundException ex) {
} catch (Exception ex) {
}
}