1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    12
    Vote Rating
    0
    sindoki is on a distinguished road

      0  

    Default Ext.device.Camera.capture crashes the app on large images

    Ext.device.Camera.capture crashes the app on large images


    Hello! Here is a problem...
    I try to get a picture in my application. Here is the code:
    Code:
    Ext.device.Camera.capture({
                                                    source: 'album',
                                                    success: function (image) {
                                                        console.log("Success!");
                                                        var imageView = Ext.getCmp('imageEditField');
                                                        var imgSrc = "data:image/jpeg;base64," + image;
                                                        imageView.setSrc(imgSrc);
                                                    },
                                                    failure: function () {
                                                        console.log('failure', arguments);
                                                    },
                                                    config: {
                                                        quality: 75,
                                                        scope: this, 
                                                        destination: 'data',
                                                        encoding: 'jpg',
                                                        height: "auto",
                                                        width: 90
                                                    }
                                                }
                                                );
    This code invokes a file browser to pick a picture. And if I choose rather small picture, it works fine, but on a large one the application crashes. It's not related to the code of Success function, it fails before.
    Is it a memory usage issue or something else? How can I fix it?
    Will appreciate any advice. Thanks.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,790
    Vote Rating
    833
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    It still happens if you don't do anything in the success callback?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    12
    Vote Rating
    0
    sindoki is on a distinguished road

      0  

    Default


    Yes, it does

  4. #4
    Sencha User
    Join Date
    Aug 2012
    Location
    Fabrègues, France
    Posts
    50
    Vote Rating
    0
    gostbuster is an unknown quantity at this point

      -1  

    Default


    Is this happening on chrome too ? Or only on a smartphone ?

  5. #5
    Sencha User
    Join Date
    Jul 2012
    Posts
    12
    Vote Rating
    0
    sindoki is on a distinguished road

      0  

    Default


    Obviously, it happens only on device.
    On Chrome a photo is not really picked - the simulator gives a sample picture.

  6. #6
    Sencha User
    Join Date
    Aug 2012
    Location
    Fabrègues, France
    Posts
    50
    Vote Rating
    0
    gostbuster is an unknown quantity at this point

      0  

    Default


    Hum ..

    Is it on an Android device ? did you test it on iPhone.

    I experienced a same problem with application crashing when going to the device's camera interface.

    I don't know if it will help you, but It was an application with phonegap. That application crashed when I was trying to take a picture. It was an Android (version 4.xx....) device. (worked fine with android 2.xx and iPhone)

    I solved my problem updating phoneGap.

    Hope it helps...

  7. #7
    Sencha User
    Join Date
    Jul 2012
    Posts
    12
    Vote Rating
    0
    sindoki is on a distinguished road

      0  

    Default


    Yes, it's on Android but without PhoneGap. I'm still searching for the solution.

  8. #8
    Sencha User
    Join Date
    Sep 2012
    Posts
    6
    Vote Rating
    0
    alexjfalcao is on a distinguished road

      0  

    Default


    Hi Sendoki, did you found a solution? I'm experiencing the same issue. Thanks

  9. #9
    Sencha User
    Join Date
    Aug 2012
    Location
    Fabrègues, France
    Posts
    50
    Vote Rating
    0
    gostbuster is an unknown quantity at this point

      0  

    Default


    Hi, what do you use to get an android installed application ?

  10. #10
    Sencha User
    Join Date
    Sep 2012
    Posts
    6
    Vote Rating
    0
    alexjfalcao is on a distinguished road

      0  

    Default


    Hi,

    I'm using Eclipse, and Sencha SDK on MAC. The Android API 7 and 15. I've tried to install on Galaxy SII with android 4.0.3.

    Thanks

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi