breautek commented on issue #345:
URL:
https://github.com/apache/cordova-plugin-camera/issues/345#issuecomment-632701308
> You are not right about the FILE_URI. The app can crash even when using
FILE_URI! It's a matter of memory management from Android.
I may have caused some confusion in my past statements, but to be clear, I'm
not saying `FILE_URI` will 100% solve the problem, but using it over `DATA_URL`
will **significantly** help. Base64 explodes the memory usage by about 40%, it
is an incredibly inefficient way to represent binary data. Which exacerbates
memory usage issues on android and causes the activity to close when in the
background. If you're using `DATA_URL`, then this is step 1 of solving the
problem.
The next step is handling activity closures. If the activity is killed, it
is up to the developer to handle resume. Which means they need to store
whatever state necessary in a safe location so that they can return to that
state on the `resume` event, should the activity be killed. Additionally, your
camera results will be stored in the resume's event `pendingResult`. This is
documented
[here](https://github.com/apache/cordova-plugin-camera#android-quirks) and
[here](https://cordova.apache.org/docs/en/dev/guide/platforms/android/index.html#retrieving-plugin-callback-results-cordova-android-510).
This step is necessary to support all devices.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org
-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org