[
https://issues.apache.org/jira/browse/CB-7856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14950929#comment-14950929
]
Richard B Knoll commented on CB-7856:
-------------------------------------
This is a documented issue on the Android platform. The Android implementation
of the camera plugin starts a new Activity when you pick a photo. Meanwhile,
the Activity holding your application is put in the background while it waits
for the photo picking Activity to return its result. In Android, when a new
Activity starts there is always the possibility that the other Activity it
replaces will get killed by the OS in the background if the device is running
low on memory. What you are likely seeing is your Activity getting killed and
restarting when the other Activity returns its result (it only happens
sometimes because it is dependent on the device's available memory). Normally
in Android you address this by using the [Activity's lifecycle
methods|http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle]
to save and restore application state. Unfortunately, this is tougher to do
using Cordova. There is some discussion happening on [this pull
request|https://github.com/apache/cordova-plugin-camera/pull/97] as to how this
case should be handled.
> app restarts when using camera android 4.4.4
> --------------------------------------------
>
> Key: CB-7856
> URL: https://issues.apache.org/jira/browse/CB-7856
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Camera
> Affects Versions: 3.5.0
> Reporter: clement bidon
>
> I have this issue on my moto G with android 4.4.4:
> I use PG build 3.5
> with org.apache.cordova.camera plugin v0.3.2
> I call the navigator.camera.getPicture to select a picture on my device, then
> I have the list of the pictures available in my galery, then when I select
> it, the app sometimes restart (most of the time it restarts!)
> no pb with the same code on the iphone or my old samsung galaxy with android
> 2.3.6
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]