0

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.

nilkash
  • 7,408
  • 32
  • 99
  • 176
  • i struggle a lot with this issue , i suggest you to try custom camera Library..... which is compatible with all devices ...... ref: http://stackoverflow.com/questions/10913682/how-to-capture-and-save-an-image-using-custom-camera-in-android – koutuk Jul 14 '15 at 05:25
  • @koutuk thank you for quick replay. Any other solution apart from custom camera solution. – nilkash Jul 14 '15 at 05:36

0 Answers0