Cordova Camera Sample Crashes After Picture Taken

4 posts, 0 answers
  1. Matthew
    Matthew avatar
    1 posts
    Member since:
    Feb 2013

    Posted 31 Jul 2013 Link to this post

    I have an Android Galaxy S3.

    I cloned the camera sample and didn't change anything. On my device, anytime after I get the picture, the app crashes before being able to display to the smallImage document.

    How can I fix this?
  2. Steve
    Steve avatar
    10941 posts

    Posted 01 Aug 2013 Link to this post

    Hello Matthew,

    We can't reproduce this in local test on Galaxy S3, but have suspicion what might be going on. According to the Cordova Camera API docs,

    Note: The image quality of pictures taken using the camera on newer devices is quite good ...Encoding such images using Base64 has caused memory issues on many newer devices. Therefore, using FILE_URI as the 'Camera.destinationType' is highly recommended.

    Most likely your phone is swarmed with other running processes at the moment and doesn't have enough memory to process the image. Please free up memory and try again. Another option is to use the sample code from the API and specify FILE_URI as destinationType instead.


    Do you enjoy Icenium? Vote for it as your favorite new product here (use short code H048S).
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  3. raja
    raja avatar
    2 posts
    Member since:
    May 2014

    Posted 05 Jun 2014 in reply to Steve Link to this post

    hi i do have the same problem....... the app crashes when i capture photo
  4. Zdravko
    Zdravko avatar
    657 posts

    Posted 09 Jun 2014 Link to this post

    Hi Raja,

    We have seen such complaints before, but we have never been able to reproduce locally.
    As a solution I will recommend using my colleague's advise from below and follow Cordova's best practices from their documentation and forums.


    Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

Back to Top