2
  • *I'm trying to take a picture with android camera intent and get this picture's location to edit text to use in the future for uploading it. How do I take the last taken picture Uri to my edit text for future use ? *

opening intent for taking a picture :

Intent camera_intent = new Intent(

android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

startActivityForResult(camera_intent, ACTIVITY_CAMERA);

getting activity for result:

public void onActivityResult(int requestCode, int resultCode, Intent data) {
        if ((resultCode == RESULT_OK) && (requestCode == ACTIVITY_CAMERA)) {
            Bitmap photo = (Bitmap) data.getExtras().get("data");
            my_image.setImageBitmap(photo);
            data.putExtra("Camera", true);
        }
CRUSADER
  • 5,486
  • 3
  • 28
  • 64
AstralVK
  • 51
  • 2
  • 6
  • if you want to get the last picture taken by user, read this https://stackoverflow.com/questions/8337585/get-the-last-picture-taken-by-user – Zeev G Jan 31 '13 at 15:03

0 Answers0