Phonegap camera damage on android 4.1.2, samsung galaxy s3, HTC

I think that many developers are familiar with this problem of failures / restarts of phone calls after receiving the image from the camera / library on Android 4.1.2.

After many searches for many solutions, I want to put some order in this problem, and I would like you to help me understand what the current solution is. Note: The current stable phone version is 2.9.0.

  • Using fileURI, not dataURL, because base64 encoded is too big to handle DOM.

  • Editing (not via the phonegap build.xml file) of the android manifest file and adding the following line to each action:

android:alwaysRetainTaskState="true" android:launchMode="singleTask".
  • Limit resolution with targetWidth / targetHeight, as the image will be large, which will lead to memory overload. and decline in quality.

  • Disconnect

"Do not hold actitivies"

in the settings of Android. These, of course, are not real solutions, because we cannot ask users to do this.

  • Again, edit the android manifest (with dropping the phone call 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 plug-in (without phone calls):

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 review of the literature .. Does anyone know which combination works? please, help!

+2
1

. : , "application" "uses-feature".

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

<application 
......

, .

+1

Source: https://habr.com/ru/post/1546980/


All Articles