com.android.camera.action.CROP alternative?

2020-04-05 09:13发布

问题:

It seems com.android.camera.action.CROP isn't reliable, since it's an internal API and is not available on every device. However, I find this library quite practical. It works great on my Galaxy Nexus.

Should I really be thinking on implementing my own solution? Am I taking too much a risk by using com.android.camera.action.CROP? Moreover, in some devices, it opens up google + crop photo which crashes later.

Finally, are there any open libraries out there I could use that would accomplish the same thing, and be safe to use on any android device?

回答1:

I hate to answer my own question, but here it is:

https://github.com/lvillani/android-cropimage

This is the source code to the library. Just include it inside your project and you won't have to worry about devices not having it anymore.