Phonegap camera crash on android 4.1.2, samsung galaxy s3, HTC
I think a lot of developers are familier with this problem of phonegap
crashes/restarts after getting a picture from camera / library on android
4.1.2.
After many searches of many solutions I want to put some order into this
problem and I wish you could help me understand what is the current
solution. Note: the current stable phonegap version is 2.9.0.
Using fileURI and not dataURL, because the encoded base64 is too big for
the DOM to handle.
Editing (not via phonegap build config.xml) the android manifest file and
add the following line to every activity:
android:alwaysRetainTaskState="true" android:launchMode="singleTask".
Limit the resolution using targetWidth/targetHeight, because the image is
to big which causes memory over load. and reducing quality..
Switch off the
"Do not keep actitivies"
option in android settings.. which is ofcourse not a real solutions
becaues we can't ask users to do that..
Again, editing the android manifest (with discarding phonegap build
service) and add:
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
<uses-feature android:name="android.hardware.camera"
android:required="false"/>
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="10"/>
<activity android:configChanges="orientation|keyboardHidden" />
Using an external camera plugin (not phonegap's):
links to all these solutions are here:
http://community.phonegap.com/nitobi/topics/phonegap_camera_crash_on_android_4_1_2_samsung_galaxy_s3_htc
Now.. After this literature review.. Does anyone know which combination
works? please help!
No comments:
Post a Comment