aximobile commented on issue #345:
URL: 
https://github.com/apache/cordova-plugin-camera/issues/345#issuecomment-648658317


   > > 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.
   
   How can we get to the 'resume' event if the app simply restarts ? 
   I would love to handle any app destroy but we just dont get there :(
   
   'Older' Android devices seem to have zero issues because of the fact that 
images have lower quality on these devices and therefore use less memory. 
   


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to