You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "peeter tomberg (JIRA)" <ji...@apache.org> on 2012/07/18 18:21:35 UTC

[jira] [Created] (CB-1089) While taking a picture with camera.getPicture, nothing happens after I return to the app.

peeter tomberg created CB-1089:
----------------------------------

             Summary: While taking a picture with camera.getPicture, nothing happens after I return to the app.
                 Key: CB-1089
                 URL: https://issues.apache.org/jira/browse/CB-1089
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 1.9.0, 2.0.0
         Environment: Android
            Reporter: peeter tomberg
            Assignee: Joe Bowser


I've made a post on StackOverFlow about it, but it seems to be a phonegap bug.

The code I use to replicate this bug is available here:

http://stackoverflow.com/questions/11544992/taking-a-picture-from-the-camera-fails-20-of-the-time

Happens on both Samsung Galaxy S2 running CM9 and a pure HTC One X (not rooted, no custom rom). Basically camera.getPicture success or failure callbacks aren't called, literally nothing happens. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1089) While taking a picture with camera.getPicture, nothing happens after I return to the app.

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420814#comment-13420814 ] 

Joe Bowser commented on CB-1089:
--------------------------------

@peeter: Turning off multi-tasking causes the app to stop every time we close it, killing it. That means it has to send a bundle to the app to restore state.  In theory that should be the same as running out of memory and having it killed off.
                
> While taking a picture with camera.getPicture, nothing happens after I return to the app.
> -----------------------------------------------------------------------------------------
>
>                 Key: CB-1089
>                 URL: https://issues.apache.org/jira/browse/CB-1089
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0, 2.0.0
>         Environment: Android
>            Reporter: peeter tomberg
>            Assignee: Joe Bowser
>
> I've made a post on StackOverFlow about it, but it seems to be a phonegap bug.
> The code I use to replicate this bug is available here:
> http://stackoverflow.com/questions/11544992/taking-a-picture-from-the-camera-fails-20-of-the-time
> Happens on both Samsung Galaxy S2 running CM9 and a pure HTC One X (not rooted, no custom rom). Basically camera.getPicture success or failure callbacks aren't called, literally nothing happens. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1089) While taking a picture with camera.getPicture, nothing happens after I return to the app.

Posted by "peeter tomberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417216#comment-13417216 ] 

peeter tomberg commented on CB-1089:
------------------------------------

Side-note, this happens around 20% of the cases. The same code works fine 4 out of 5 times, then on the 5th time nothing happens after I return to the app from the camera. 
                
> While taking a picture with camera.getPicture, nothing happens after I return to the app.
> -----------------------------------------------------------------------------------------
>
>                 Key: CB-1089
>                 URL: https://issues.apache.org/jira/browse/CB-1089
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0, 2.0.0
>         Environment: Android
>            Reporter: peeter tomberg
>            Assignee: Joe Bowser
>
> I've made a post on StackOverFlow about it, but it seems to be a phonegap bug.
> The code I use to replicate this bug is available here:
> http://stackoverflow.com/questions/11544992/taking-a-picture-from-the-camera-fails-20-of-the-time
> Happens on both Samsung Galaxy S2 running CM9 and a pure HTC One X (not rooted, no custom rom). Basically camera.getPicture success or failure callbacks aren't called, literally nothing happens. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1089) While taking a picture with camera.getPicture, nothing happens after I return to the app.

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419667#comment-13419667 ] 

Joe Bowser commented on CB-1089:
--------------------------------

So, if we turn off multi-tasking, in theory we should be able to reproduce this 100% of the time, right? 
                
> While taking a picture with camera.getPicture, nothing happens after I return to the app.
> -----------------------------------------------------------------------------------------
>
>                 Key: CB-1089
>                 URL: https://issues.apache.org/jira/browse/CB-1089
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0, 2.0.0
>         Environment: Android
>            Reporter: peeter tomberg
>            Assignee: Joe Bowser
>
> I've made a post on StackOverFlow about it, but it seems to be a phonegap bug.
> The code I use to replicate this bug is available here:
> http://stackoverflow.com/questions/11544992/taking-a-picture-from-the-camera-fails-20-of-the-time
> Happens on both Samsung Galaxy S2 running CM9 and a pure HTC One X (not rooted, no custom rom). Basically camera.getPicture success or failure callbacks aren't called, literally nothing happens. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1089) While taking a picture with camera.getPicture, nothing happens after I return to the app.

Posted by "peeter tomberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419906#comment-13419906 ] 

peeter tomberg commented on CB-1089:
------------------------------------

Sorry, I'm not following your trail of thought?
                
> While taking a picture with camera.getPicture, nothing happens after I return to the app.
> -----------------------------------------------------------------------------------------
>
>                 Key: CB-1089
>                 URL: https://issues.apache.org/jira/browse/CB-1089
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0, 2.0.0
>         Environment: Android
>            Reporter: peeter tomberg
>            Assignee: Joe Bowser
>
> I've made a post on StackOverFlow about it, but it seems to be a phonegap bug.
> The code I use to replicate this bug is available here:
> http://stackoverflow.com/questions/11544992/taking-a-picture-from-the-camera-fails-20-of-the-time
> Happens on both Samsung Galaxy S2 running CM9 and a pure HTC One X (not rooted, no custom rom). Basically camera.getPicture success or failure callbacks aren't called, literally nothing happens. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CB-1089) While taking a picture with camera.getPicture, nothing happens after I return to the app.

Posted by "peeter tomberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417216#comment-13417216 ] 

peeter tomberg edited comment on CB-1089 at 7/18/12 4:26 PM:
-------------------------------------------------------------

Side-note, this happens around 20% of the cases. The same code works fine 4 out of 5 times, then on the 5th time nothing happens after I return to the app from the camera. This applies both for the success and the error callback, if I cancel taking the picture (press back on my phone), the error callback is sometimes not triggered also. 
                
      was (Author: peeter tomberg):
    Side-note, this happens around 20% of the cases. The same code works fine 4 out of 5 times, then on the 5th time nothing happens after I return to the app from the camera. 
                  
> While taking a picture with camera.getPicture, nothing happens after I return to the app.
> -----------------------------------------------------------------------------------------
>
>                 Key: CB-1089
>                 URL: https://issues.apache.org/jira/browse/CB-1089
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0, 2.0.0
>         Environment: Android
>            Reporter: peeter tomberg
>            Assignee: Joe Bowser
>
> I've made a post on StackOverFlow about it, but it seems to be a phonegap bug.
> The code I use to replicate this bug is available here:
> http://stackoverflow.com/questions/11544992/taking-a-picture-from-the-camera-fails-20-of-the-time
> Happens on both Samsung Galaxy S2 running CM9 and a pure HTC One X (not rooted, no custom rom). Basically camera.getPicture success or failure callbacks aren't called, literally nothing happens. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1089) While taking a picture with camera.getPicture, nothing happens after I return to the app.

Posted by "peeter tomberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420140#comment-13420140 ] 

peeter tomberg commented on CB-1089:
------------------------------------

We are indeed using a DATA_URL. 

As I understand, Android kills and respawns my application if memory is too low. And because of that, the callback phonegap sends is sent to the wrong instance of my app (that no longer exists)?  Isn't it possible for phonegap to detect this and send the callback from the camera to the newly spawned application?
                
> While taking a picture with camera.getPicture, nothing happens after I return to the app.
> -----------------------------------------------------------------------------------------
>
>                 Key: CB-1089
>                 URL: https://issues.apache.org/jira/browse/CB-1089
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0, 2.0.0
>         Environment: Android
>            Reporter: peeter tomberg
>            Assignee: Joe Bowser
>
> I've made a post on StackOverFlow about it, but it seems to be a phonegap bug.
> The code I use to replicate this bug is available here:
> http://stackoverflow.com/questions/11544992/taking-a-picture-from-the-camera-fails-20-of-the-time
> Happens on both Samsung Galaxy S2 running CM9 and a pure HTC One X (not rooted, no custom rom). Basically camera.getPicture success or failure callbacks aren't called, literally nothing happens. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1089) While taking a picture with camera.getPicture, nothing happens after I return to the app.

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420088#comment-13420088 ] 

Simon MacDonald commented on CB-1089:
-------------------------------------

Peeter is it failing when you take a DATA_URL picture or FILE_URI picture? I notice in the SO question you have both examples. The DATA_URL more than likely will generate and out of memory exception.
                
> While taking a picture with camera.getPicture, nothing happens after I return to the app.
> -----------------------------------------------------------------------------------------
>
>                 Key: CB-1089
>                 URL: https://issues.apache.org/jira/browse/CB-1089
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0, 2.0.0
>         Environment: Android
>            Reporter: peeter tomberg
>            Assignee: Joe Bowser
>
> I've made a post on StackOverFlow about it, but it seems to be a phonegap bug.
> The code I use to replicate this bug is available here:
> http://stackoverflow.com/questions/11544992/taking-a-picture-from-the-camera-fails-20-of-the-time
> Happens on both Samsung Galaxy S2 running CM9 and a pure HTC One X (not rooted, no custom rom). Basically camera.getPicture success or failure callbacks aren't called, literally nothing happens. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-1089) While taking a picture with camera.getPicture, nothing happens after I return to the app.

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser resolved CB-1089.
----------------------------

    Resolution: Won't Fix

OK, this sucks, but no, we can't do anything about this.  onStop isn't being called if the app is killed for memory and instead the app is killed.  I do recommend turning off multitasking to see if that helps, and using FILE_URI, but there's not much else we can do. 

http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle

I really wish I could say "Can't fix, Android won't let me"
                
> While taking a picture with camera.getPicture, nothing happens after I return to the app.
> -----------------------------------------------------------------------------------------
>
>                 Key: CB-1089
>                 URL: https://issues.apache.org/jira/browse/CB-1089
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0, 2.0.0
>         Environment: Android
>            Reporter: peeter tomberg
>            Assignee: Joe Bowser
>
> I've made a post on StackOverFlow about it, but it seems to be a phonegap bug.
> The code I use to replicate this bug is available here:
> http://stackoverflow.com/questions/11544992/taking-a-picture-from-the-camera-fails-20-of-the-time
> Happens on both Samsung Galaxy S2 running CM9 and a pure HTC One X (not rooted, no custom rom). Basically camera.getPicture success or failure callbacks aren't called, literally nothing happens. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira