Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Intent intent = new Intent(Intent.ACTION_PICK,
- MediaStore.Images.Media.INTERNAL_CONTENT_URI);
- intent.setType("image/*");
- intent.putExtra("crop", "true");
- intent.putExtra("scale", true);
- intent.putExtra("outputX", 256);
- intent.putExtra("outputY", 256);
- intent.putExtra("aspectX", 1);
- intent.putExtra("aspectY", 1);
- intent.putExtra("return-data", true);
- startActivityForResult(intent, code);
- if (requestCode == RESULT_LOAD_IMAGE && data != null) {
- final Bundle extras = data.getExtras();
- if (extras != null) {
- //Get image
- Bitmap profilePicBitmap = extras.getParcelable("data");
- ...
- data.getData()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement