Phonegap camera crash on android 4.1.2, samsung galaxy s3, HTC -


i think lot of developers familier problem of phonegap crashes/restarts after getting picture camera / library on android 4.1.2.

after many searches of many solutions want put order problem , wish me understand current solution. note: current stable phonegap version 2.9.0.

  1. using fileuri , not dataurl, because encoded base64 big dom handle.

  2. editing (not via phonegap build config.xml) android manifest file , add following line every activity:

android:alwaysretaintaskstate="true" android:launchmode="singletask". 
  1. limit resolution using targetwidth/targetheight, because image big causes memory on load. , reducing quality..

  2. switch off

"do not keep actitivies"

option in android settings.. ofcourse not real solutions becaues can't ask users that..

  1. again, editing android manifest (with discarding phonegap build service) , 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" /> 
  1. using external camera plugin (not phonegap's):

links these solutions here: http://community.phonegap.com/nitobi/topics/phonegap_camera_crash_on_android_4_1_2_samsung_galaxy_s3_htc

now.. after literature review.. know combination works? please help!

i had similar problem. require following work: make sure "uses-feature" tag appears after "application" tag.

<uses-feature android:name="android.hardware.camera" android:required="false"/> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>  <application  ...... 

i hope resolves issue.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -