`
RandyWei
  • 浏览: 65164 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Cropped image not returned on Motorola Droid

 
阅读更多

Cropped image not returned on Motorola Droid

Hello, I have written some code to get a cropped image from the phone which I've tested and is working on both the Android emulator and on the G1 hardware. The behavior is different on the Motorola Droid so I could use some help figuring this out.

 

I'm creating an intent to get the cropped image with this code segment:

 

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
intent.putExtra("crop", "true");
intent.putExtra("outputX",         width);
intent.putExtra("outputY",         height);
intent.putExtra("aspectX",         width);
intent.putExtra("aspectY",         height);
intent.putExtra("scale",           true);
intent.putExtra("noFaceDetection", true);
intent.putExtra("setWallpaper",    false);
intent.putExtra("return-data", true);

 

 

I'm then calling startActivityForResult() passing the intent. This brings up the gallery browser on the phone alowing me to select an image and it will go into crop mode. This all works consistenlty across devices.

 

The difference is what happens after I've clicked Save after selecting my crop region. On the Motorola Droid it will simply return back to the gallery browser showing all the images.

 

The expected behavior and what happens in the emulator is my onActivityResult() is called where I then have the following code to grab the bitmap:

 

final Bundle extras = data.getExtras();
Bitmap bitmap = extras.getParcelable("data");

 

I'd appreciate any help as to the differences in the API and if there are changes I need to make to have this work on the Droid.

 

Thank you!

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics