Hi
I am using Intent.ACTION_GET_CONTENT to grab pictures either through camera or picture gallery. On Motorola Enzo and Cliq, "Pick from gallery" presents two options - Picture Gallery or Pictures.
Using Pictures works great and am able to pick a picture from the sdcard into my application. But if I choose Picture Gallery, I can see, select and scale the pictures from the sdcard, but can't really choose one into my application. Also, am no longer able to exit out of this utility and can only power off the phone.
The code I am using is:
Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null);
intent.setType("image/*");
intent.putExtra("crop", "true");
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
// We should always get back an image that is no larger than these dimensions
intent.putExtra("outputX", 800);
intent.putExtra("outputY", 800);
// Scale the image down to 800 x 800
intent.putExtra("scale", true);
// Tell the picker to write its output to this URI
intent.putExtra("output", Uri.fromFile(tempFile));
intent.putExtra("outputFormat", "JPEG");
Any idea how to make it work for Picture Gallery.
Thanks in advance
-Vikas
I am using Intent.ACTION_GET_CONTENT to grab pictures either through camera or picture gallery. On Motorola Enzo and Cliq, "Pick from gallery" presents two options - Picture Gallery or Pictures.
Using Pictures works great and am able to pick a picture from the sdcard into my application. But if I choose Picture Gallery, I can see, select and scale the pictures from the sdcard, but can't really choose one into my application. Also, am no longer able to exit out of this utility and can only power off the phone.
The code I am using is:
Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null);
intent.setType("image/*");
intent.putExtra("crop", "true");
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
// We should always get back an image that is no larger than these dimensions
intent.putExtra("outputX", 800);
intent.putExtra("outputY", 800);
// Scale the image down to 800 x 800
intent.putExtra("scale", true);
// Tell the picker to write its output to this URI
intent.putExtra("output", Uri.fromFile(tempFile));
intent.putExtra("outputFormat", "JPEG");
Any idea how to make it work for Picture Gallery.
Thanks in advance
-Vikas