-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: (Rare) ANR when using ImageFactory.compress() #335
Comments
I can check it but do you use a different version/fork of the module? |
As an alternative: av.imageview with resize: av.imageview-android-5.1.0.zip
and then you can put that resized blob into the compression |
We use 4.1.1 right now, but I assume the compression didn't change there, yet. We would really prefer a stable API in this module if possible - the Compressor lib really looks promising. What do you think? Maybe I can also do the change |
No that didn't change, was just wondering if you have a different fork that might do some other work before. I did a test with a backgroundThread already and it works but I just can't get the image back into the app 😄 Compressor looks good to but I think it will have the same issue if you don't put it in a different thread (it has an example at the bottom). So different ways to go here but a Compressor module would be nice too. It has some open issue (e.g. memory issues zetbaitsu/Compressor#190) and some open PRs like More precise image resolution so perhaps other libraries are more up to date. But shouldn't be that difficult to create it anyways |
It's used to compress an image prior to uploading it. |
the |
In some cases, the compress-API can cause an ANR due to draining memory. The solution should be to either make it fully async (via background thread) or use a different, more stable, compression algorithm. Maybe there are advancements in the Android world since the initial release.
Maybe use Compressor for all compression-related tasks?
ANR log:
The text was updated successfully, but these errors were encountered: