I'm trying to get a picture from user during a registration proccess. So I have a form, and a button that starts camera, galerry, dropbox etc and asks user to choose or take a pic.
At the button onClick method I'm using the example at the 2nd answer of this topic Allow user to select camera or gallery for image and it opens a dialog with my image apps as options. After taking or choosing a foto, my code at onActivityResult is the following:
Bundle extras = data.getExtras();
Bitmap mImageBitmap = (Bitmap) extras.get("data");
foto.setImageBitmap(mImageBitmap)
So I have 2 problems. First, this get only a thumbnail image, and not the full-sized picture I need. Second, this only works if user chooses to take a new pic with camera...
for getting the fullsize pic, this code seems good Android Camera Intent: how to get full sized photo? but its only for camera-taken pics, and also with this chooser intent I'm not sure where this code would fit. Should I verify witch source use has choosed? If so, how could I do that?
EDIT: The chooser intent offers me 4 options of image sources: Camera, Gallery, Dropbox and ASTRO File Manager. Of course more options would be available if I had other apps installed. So I've checked the intent contents at each case:
CAMERA: act=inline-data (has extras)
DROPBOX and GALLERY: dat="file path"
ASTRO: dat="file path" (has extras)
so verifying if the intent has extras or not doesn't tells me the source. Also both data.hasExtra("act") and data.hasExtra("dat") are returning false.