0

I have to crop an image. I'm using code similar to the one here. Which starts an activity which responds to this action:

"com.android.camera.action.CROP"

It works well on all devices I tested - it does find always 1 Activity and starts it. Works fine.

But can I rely on it? Or will be devices without any crop possibility (In that case I would have to implement the crop functionality in my App)?

Edit: Forgot to mention: Crop dynamically - the user will select the area (using a rectangle with fixed dimensions).

User
  • 31,811
  • 40
  • 131
  • 232
  • Why dont you use manual cropping method ? – SALMAN Jul 27 '12 at 14:01
  • which one? I just started doing this task and found that link, tested it, worked, and was wondering if I can keep it. But it seems it's not the case. – User Jul 27 '12 at 14:02

1 Answers1

2

But can I rely on it?

No.

Or will be devices without any crop possibility

Yes. This has come up already. This is an undocumented, unsupported feature of one camera application that may or may not be present on the device, could be no longer exported in some future version of Android, etc.

In that case I would have to implement the crop functionality in my app

That is certainly what I would recommend. Note that there is a port of the crop activity from the Gallery app floating around GitHub somewhere that you could consider using, if you want the same basic functionality with your own private implementation.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491