I am developing an application that should upload images to a server using WebView. But when the user clicks the “File Select” button and selects “Gallery” or “Camera” to select a photo. My application will restart.
This is definitely a memory problem, because if I restart my mobile phone, it will start working normally.
This problem is observed only on S3 and several other devices. On most devices, it works fine.
Edit:
The problem is not related to the PICTURE SIZE. Even if I select a gallery to select an image, and when the gallery opens, I just press the back button to return to the application and the application will restart.
This means that it has nothing to do with image size. When the gallery opens in full screen and my app goes to the background, Android kills my app due to low memory or something like that. But I don’t know how to handle this.
I save the state of the web view and restore it ... but it does not help
source
share