In the past I know older versions of Android have issues handling memory when using the camera and gallery, but now testing PhoneGap 2.5.0 on a Samsung Charge running Android 2.3.6, the app crashes every time using either the camera or gallery. But it runs perfectly fine on a Samsung Galaxy S3.
Here's the stack trace:
java.lang.RuntimeException: Unable to resume activity
{
com.myapp.app/com.myapp.app.HelloPhoneGapActivity}:
java.lang.RuntimeException: Failure delivering result
ResultInfo{who=null, request=18, result=-1, data=Intent {
dat=content://media/external/images/media/14 }} to activity
{
com.myapp.app/com.myapp.app.HelloPhoneGapActivity}:
java.lang.NullPointerException
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2124)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2139)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1672)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused
by: java.lang.RuntimeException: Failure delivering result
ResultInfo{who=null, request=18, result=-1, data=Intent {
dat=content://media/external/images/media/14 }} to activity
{
com.myapp.app/com.myapp.app.HelloPhoneGapActivity}:
java.lang.NullPointerException
at android.app.ActivityThread.deliverResults(ActivityThread.java:2536)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2111)
... 12 more
Caused by: java.lang.NullPointerException
at org.apache.cordova.DroidGap.onActivityResult(DroidGap.java:849)
at android.app.Activity.dispatchActivityResult(Activity.java:3908)
at android.app.ActivityThread.deliverResults(ActivityThread.java:2532)
... 13 more
Any thoughts?
Thanks
John