navigator.device.capture.captureImage restarts app

144 views
Skip to first unread message

mSpeas

unread,
Dec 12, 2011, 5:56:40 PM12/12/11
to phonegap
Using Phonegap 1.2.0, In Android, after making a
navigator.device.capture.captureImage call, I am able to capture the
image 100% of the time, it's successfully saved to the phone 100% of
the time, but then 20% - 90% of the time (depending on which phone I
test it on) the app restarts and I lose the callback information
needed to work with the image.

I have android:configChanges="orientation|keyboardHidden" added to
each activity in my manifest.

I see many examples of this issue from searches, but no solution. I
realize it's due to Android cleaning up my app to reclaim resources,
but shouldn't the savedInstanceState in the app.java still allow my
app to restart in the state it was closed in, ready to receive the
callback info? Maybe I don't fully understand this part.

As a workaround I've been able to use localStorage to basically init
the phone in it's last state when this happens, but I'm still having
trouble finding a way to determine what the captured image's filename
is.

Thanks in advance :)

mSpeas

unread,
Dec 14, 2011, 12:16:11 PM12/14/11
to phonegap
Are we allowed to bump? Forgive me if the answer is no, this is a
major blocker to our project. :/

John Reeves

unread,
Jan 26, 2012, 9:31:45 PM1/26/12
to phonegap
Sorry I don't have a solution. I just want to note that this exact
thing is happening to me, except I have never had it work (maybe I
haven't tried it enough times to see the 20%).

So, I'd like to find an answer :)

I'm using a Droid 3, which does seem to have a non-standard camera
app, if that might have any effect.


On Dec 12 2011, 2:56 pm, mSpeas <msp...@geospatialsolutions.com>
wrote:

shane aleksic

unread,
Oct 14, 2013, 8:19:43 PM10/14/13
to phon...@googlegroups.com, msp...@geospatialsolutions.com
My issue was that the app would crash after the image has been taken.  I fixed this issue by implementing the following line in the manifest:

    <uses-sdk  android:minSdkVersion="7" android:targetSdkVersion="17" />

The min SDK version changed to 7 is what caused the app to not crash after the pic was taken.  However, now I get a response error code 3 returned and the picture is not returned to my app.  Any advice on this would be appreciated.  

Thanks
Reply all
Reply to author
Forward
0 new messages