Hi I am developing android application in which I am using camera intent to capture a picture and store it to specified location. It works fine on some devices but on some devices when I start camera it close my previous activity and when I came back from camera to my application it creates two images. One at location which I specified for camera intent and one default at gallery. I don't want to store at gallery. I tried it in two ways:
intent.putExtra(MediaStore.EXTRA_OUTPUT,
Uri.fromFile(new File( Common.getLocalCacheTempDirectoryPath()+ Constants.tmp_profile_image_path)));
((Activity)getContext()).startActivityForResult(intent, Constants.REQUEST_CODE_CAPTURE_PROFILE_PHOTO);
So above code works fine only thing if check in background that it destroy my previous activity when I start camera application. It works fine on some devices but on some devices not working properly. Need some help. Thank you.