I'm working on several Phonegap projects. In some of them I'm using the camera functions.
I'm puzzling with this issue (from the Phonegap documentation):
Android Quirks
Android uses intents to launch the camera activity on the device to capture images, and on phones with low memory, the Cordova activity may be killed. In this scenario, the image may not appear when the cordova activity is restored.
I'm having this problem on one of my test devices constantly (HTC One X). It's quite full, so good to test this.
I noticed there is an alternative plugin: https://code.google.com/p/foreground-camera-plugin/ for this problem. But I try to avoid plugins as much as possible... (to be portable to other platforms easily). And it's available up to Phonegap 2.4.0 and I'm working with Phonegap 2.9.0
I already use the file URI and not the Data (to avoid the memory problem).
My question is: does anybody know when Android decides to kill other activities (like Cordova, which is quite needed for Phonegap). On what level of free memory? (percentage, MB). So I could check this in advance and warn the user.
Of course I hope this issue gets resolved... but it doesn't seem to be resolved soon....
Edit after the first remark
I've no intention resolving the real problem, I've found out that's not really possible. It's a thing between Android and Phonegap. I just need to know whether it's possible to warn the user this will happen. So the user can kill some of the other apps before continuing... So when does this occur? When does android think there is not enough memory to get this thing going on? That's my question.
Edit 2013 Nov. 29th
Because of the link given by AustinAllover, I now know this is not just a Phonegap issue... The Android camera seems to kill all Java apps in case of too few memory... so the question is more generic than Phonegap/Cordova only...