- *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);
}