I have MainActivity in which I can launch camera application to take and upload photo. After home long press while in camera app and returning back from recents I return to camera application. How can I ALWAYS return to MainActivity from recents or after launcher icon click?
My camera app intent:
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) {
}
}