Hybrid View

  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    38
    Vote Rating
    2
    Ocelyn is on a distinguished road

      0  

    Default Unanswered: Application stuck on SplashScreen on BlackBerry simulator (phonegap)

    Unanswered: Application stuck on SplashScreen on BlackBerry simulator (phonegap)


    Hello everybody,

    I'm stuck for hours now on this problem, I have my application created with the last version of Sencha, who works fine on IOS and Android, using Phonegap 2.2.0 to pack everything.
    Now I want to put my app on Blackberry using Webworks and Phonegap.

    When I launch my application it stuck on the SplashScreen, I search a solution and it seems that maybe Sencha Touch 2 is loaded before Phonegap and could bring some problem, so I tried to modify my index.html to launch ST2 after Phonegap :

    Code:
    <script type="text/javascript" charset="utf-8">
    
        // Wait for PhoneGap to load
        //
            // register PhoneGap event listeners when DOM content loaded
            function initPhonegap() {
                            document.body.style.height = screen.height;
                console.log('init()');
                            document.addEventListener("deviceready", onDeviceReadyOT, true);
                            }
    
        // PhoneGap is ready
        //
        function onDeviceReadyOT() {                   
           
           
                    
                        (function(i){function s(a){function b(a,j){var  c=a.length,b,g;for(b=0;b<c;b++){g=a[b];var e=a,K=b,d=void  0;"string"==typeof  g&&(g={path:g});g.shared?(g.version=g.shared,d=g.shared+g.path):(A.href=g.path,d=A.href);g.uri=d;g.key=h+"-"+d;f[d]=g;e[K]=g;g.type=j;g.index=b;g.collection=a;g.ready=!1;g.evaluated=!1}return  a}var c;"string"==typeof a?(c=a,a=B(c)):c=JSON.stringify(a);var  h=a.id,e=h+"-"+C+o,f={};this.key=e;this.css=b(a.css,"css");this.js=b(a.js,"js");this.assets=this.css.concat(this.js);this.getAsset=
    function(a){return  f[a]};this.store=function(){t(e,c)}}function v(a,b){k.write('<meta  name="'+a+'" content="'+b+'">')}function p(a,b,c){var h=new  XMLHttpRequest,c=c||D,a=a+(-1==a.indexOf("?")?"?":"&")+Date.now();try{h.open("GET",a,!0),h.onreadystatechange=function(){if(4==h.readyState){var   a=h.status,d=h.responseText;200<=a&&300>a||304==a||0==a&&0<d.length?b(d):c()}},h.send(null)}catch(d){c()}}function  L(a,b){var  c=k.createElement("iframe");m.push({iframe:c,callback:b});c.src=a+".html";c.style.cssText=
    "width:0;height:0;border:0;position:absolute;z-index:-999;visibility:hidden";k.body.appendChild(c)}function  E(a,b,c){var d=!!a.shared;if(a.remote)b("");else{if(!d)var  e=b,f=a.version,l,b=function(j){l=j.substring(0,f.length+4);l!=="/*"+f+"*/"?confirm("Requested:  '"+a.uri+"' with checksum: "+f+" but received:  "+l.substring(2,f.length)+"instead. Attempt to refresh the  application?")&&M():e(j)};(d?L:p)(a.uri,b,c)}}function F(a){var  b=a.data,a=a.source.window,c,d,e,f;c=0;for(d=m.length;c<d;c++)if(e=m[c],
    f=e.iframe,f.contentWindow===a){e.callback(b);k.body.removeChild(f);m.splice(c,1);break}}function  G(a){"undefined"!=typeof  console&&(console.error||console.log).call(console,a)}function  t(a,b){try{n.setItem(a,b)}catch(c){if(c.code==c.QUOTA_EXCEEDED_ERR&&q){var  d=q.assets.map(function(a){return  a.key}),e=0,f=n.length,l=!1,j;for(d.push(q.key);e<=f-1;)j=n.key(e),-1==d.indexOf(j)?(n.removeItem(j),l=!0,f--):e++;l&&t(a,b)}}}function  u(a){try{return n.getItem(a)}catch(d){return null}}function M(){H||(H=
    !0,p(o,function(a){(new  s(a)).store();i.location.reload()}))}function w(a){function b(a,d){var  b=a.collection,g=a.index,f=b.length,e;a.ready=!0;a.content=d;for(e=g-1;0<=e;e--)if(a=b[e],!a.ready||!a.evaluated)return;for(e=g;e<f;e++)if(a=b[e],a.ready)a.evaluated||c(a);else  break}function  c(a){a.evaluated=!0;if("js"==a.type)try{eval(a.content)}catch(b){G("Error  evaluating "+a.uri+" with message: "+b)}else{var  d=k.createElement("style"),c;d.type="text/css";d.textContent=a.content;"id"in  a&&(d.id=a.id);
    "disabled"in  a&&(d.disabled=a.disabled);c=document.createElement("base");c.href=a.path.replace(/\/[^\/]*$/,"/");x.appendChild(c);x.appendChild(d);x.removeChild(c)}delete  a.content;0==--f&&h()}function h(){function  b(){k&&c()}function c(){var a=r.onUpdated||D;if("onSetup"in  r)r.onSetup(a);else a()}function  e(){l.store();h.forEach(function(a){t(a.key,a.content)});c()}function  g(a,b){a.content=b;0==--m&&(d.status==d.IDLE?e():i=e)}function  f(){I("online",f,!1);p(o,function(c){q=l=new s(c);var  e;l.assets.forEach(function(b){e=
    a.getAsset(b.uri);(!e||b.version!==e.version)&&h.push(b)});m=h.length;0==m?d.status==d.IDLE?b():i=b:h.forEach(function(b){function  d(){E(b,function(a){g(b,a)})}var  c=a.getAsset(b.uri),e=b.path,f=b.update;!c||!f||null===u(b.key)||"delta"!=f?d():p("deltas/"+e+"/"+c.version+".json",function(a){try{var  d=b,c;var  e=u(b.key),f=B(a),a=[],h,j,i;if(0===f.length)c=e;else{j=0;for(i=f.length;j<i;j++)h=f[j],"number"===typeof   h?a.push(e.substring(h,h+f[++j])):a.push(h);c=a.join("")}g(d,c)}catch(k){G("Malformed  delta content received for "+
    b.uri)}},d)})})}var  h=[],k=!1,i=function(){},n=function(){d.swapCache();k=!0;i()},m;I("message",F,!1);if(d.status==d.UPDATEREADY)n();else   if(d.status==d.CHECKING||d.status==d.DOWNLOADING)d.onupdateready=n,d.onnoupdate=d.onobsolete=function(){i()};!1!==navigator.onLine?f():y("online",f,!1)}var   e=a.assets,f=e.length,l;q=a;y("message",F,!1);0==f?h():e.forEach(function(a){var   c=u(a.key);null===c?E(a,function(c){a.remote||t(a.key,c);b(a,c)},function(){b(a,"")}):b(a,c)})}function  J(a){null!==k.readyState.match(/interactive|complete|loaded/)?
    w(a):y("DOMContentLoaded",function(){navigator.standalone?setTimeout(function(){setTimeout(function(){w(a)},1)},1):w(a)},!1)}var   D=function(){},m=[],k=i.document,x=k.head,y=i.addEventListener,I=i.removeEventListener,n=i.localStorage,d=i.applicationCache,B=JSON.parse,A=k.createElement("a"),z=k.location,C=z.origin+z.pathname+z.search,o="app.json",H=!1,q;if("undefined"===typeof  r)var r=i.Ext={};r.blink=function(a){var  b=u(a.id+"-"+C+o);v("viewport","user-scalable=no, initial-scale=1,  maximum-scale=1, minimum-scale=1, width=device-width,  height=device-height, target-densitydpi=device-dpi");
    v("apple-mobile-web-app-capable","yes");v("apple-touch-fullscreen","yes");b?(a=new  s(b),J(a)):p(o,function(b){a=new  s(b);a.store();J(a)})}})(this);;Ext.blink({"id":"ba7734f5-ef3e-4477-bcea-70fb8b8a9663"})                        
        }       
        </script>
    Instead of putting the SenchaTouch2 initializer functions here :

    Code:
        function onDeviceReadyOT() {
            // Empty                
        }
        </script> 
            
        <script type="text/javascript">
                        (function(i){function s(a){function b(a,j){var c=a.length,b,g;for(b=0;b<c;b++){g=a[b];var e=a,K=b,d=void 0;"string"==typeof g&&(g={path:g});g.shared?(g.version=g.shared,d=g.shared+g.path):(A.href=g.path,d=A.href);g.uri=d;g.key=h+"-"+d;f[d]=g;e[K]=g;g.type=j;g.index=b;g.collection=a;g.ready=!1;g.evaluated=!1}return a}var c;"string"==typeof a?(c=a,a=B(c)):c=JSON.stringify(a);var h=a.id,e=h+"-"+C+o,f={};this.key=e;this.css=b(a.css,"css");this.js=b(a.js,"js");this.assets=this.css.concat(this.js);this.getAsset=
    function(a){return f[a]};this.store=function(){t(e,c)}}function v(a,b){k.write('<meta name="'+a+'" content="'+b+'">')}function p(a,b,c){var h=new XMLHttpRequest,c=c||D,a=a+(-1==a.indexOf("?")?"?":"&")+Date.now();try{h.open("GET",a,!0),h.onreadystatechange=function(){if(4==h.readyState){var a=h.status,d=h.responseText;200<=a&&300>a||304==a||0==a&&0<d.length?b(d):c()}},h.send(null)}catch(d){c()}}function L(a,b){var c=k.createElement("iframe");m.push({iframe:c,callback:b});c.src=a+".html";c.style.cssText=
    "width:0;height:0;border:0;position:absolute;z-index:-999;visibility:hidden";k.body.appendChild(c)}function E(a,b,c){var d=!!a.shared;if(a.remote)b("");else{if(!d)var e=b,f=a.version,l,b=function(j){l=j.substring(0,f.length+4);l!=="/*"+f+"*/"?confirm("Requested: '"+a.uri+"' with checksum: "+f+" but received: "+l.substring(2,f.length)+"instead. Attempt to refresh the application?")&&M():e(j)};(d?L:p)(a.uri,b,c)}}function F(a){var b=a.data,a=a.source.window,c,d,e,f;c=0;for(d=m.length;c<d;c++)if(e=m[c],
    f=e.iframe,f.contentWindow===a){e.callback(b);k.body.removeChild(f);m.splice(c,1);break}}function G(a){"undefined"!=typeof console&&(console.error||console.log).call(console,a)}function t(a,b){try{n.setItem(a,b)}catch(c){if(c.code==c.QUOTA_EXCEEDED_ERR&&q){var d=q.assets.map(function(a){return a.key}),e=0,f=n.length,l=!1,j;for(d.push(q.key);e<=f-1;)j=n.key(e),-1==d.indexOf(j)?(n.removeItem(j),l=!0,f--):e++;l&&t(a,b)}}}function u(a){try{return n.getItem(a)}catch(d){return null}}function M(){H||(H=
    !0,p(o,function(a){(new s(a)).store();i.location.reload()}))}function w(a){function b(a,d){var b=a.collection,g=a.index,f=b.length,e;a.ready=!0;a.content=d;for(e=g-1;0<=e;e--)if(a=b[e],!a.ready||!a.evaluated)return;for(e=g;e<f;e++)if(a=b[e],a.ready)a.evaluated||c(a);else break}function c(a){a.evaluated=!0;if("js"==a.type)try{eval(a.content)}catch(b){G("Error evaluating "+a.uri+" with message: "+b)}else{var d=k.createElement("style"),c;d.type="text/css";d.textContent=a.content;"id"in a&&(d.id=a.id);
    "disabled"in a&&(d.disabled=a.disabled);c=document.createElement("base");c.href=a.path.replace(/\/[^\/]*$/,"/");x.appendChild(c);x.appendChild(d);x.removeChild(c)}delete a.content;0==--f&&h()}function h(){function b(){k&&c()}function c(){var a=r.onUpdated||D;if("onSetup"in r)r.onSetup(a);else a()}function e(){l.store();h.forEach(function(a){t(a.key,a.content)});c()}function g(a,b){a.content=b;0==--m&&(d.status==d.IDLE?e():i=e)}function f(){I("online",f,!1);p(o,function(c){q=l=new s(c);var e;l.assets.forEach(function(b){e=
    a.getAsset(b.uri);(!e||b.version!==e.version)&&h.push(b)});m=h.length;0==m?d.status==d.IDLE?b():i=b:h.forEach(function(b){function d(){E(b,function(a){g(b,a)})}var c=a.getAsset(b.uri),e=b.path,f=b.update;!c||!f||null===u(b.key)||"delta"!=f?d():p("deltas/"+e+"/"+c.version+".json",function(a){try{var d=b,c;var e=u(b.key),f=B(a),a=[],h,j,i;if(0===f.length)c=e;else{j=0;for(i=f.length;j<i;j++)h=f[j],"number"===typeof h?a.push(e.substring(h,h+f[++j])):a.push(h);c=a.join("")}g(d,c)}catch(k){G("Malformed delta content received for "+
    b.uri)}},d)})})}var h=[],k=!1,i=function(){},n=function(){d.swapCache();k=!0;i()},m;I("message",F,!1);if(d.status==d.UPDATEREADY)n();else if(d.status==d.CHECKING||d.status==d.DOWNLOADING)d.onupdateready=n,d.onnoupdate=d.onobsolete=function(){i()};!1!==navigator.onLine?f():y("online",f,!1)}var e=a.assets,f=e.length,l;q=a;y("message",F,!1);0==f?h():e.forEach(function(a){var c=u(a.key);null===c?E(a,function(c){a.remote||t(a.key,c);b(a,c)},function(){b(a,"")}):b(a,c)})}function J(a){null!==k.readyState.match(/interactive|complete|loaded/)?
    w(a):y("DOMContentLoaded",function(){navigator.standalone?setTimeout(function(){setTimeout(function(){w(a)},1)},1):w(a)},!1)}var D=function(){},m=[],k=i.document,x=k.head,y=i.addEventListener,I=i.removeEventListener,n=i.localStorage,d=i.applicationCache,B=JSON.parse,A=k.createElement("a"),z=k.location,C=z.origin+z.pathname+z.search,o="app.json",H=!1,q;if("undefined"===typeof r)var r=i.Ext={};r.blink=function(a){var b=u(a.id+"-"+C+o);v("viewport","user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi");
    v("apple-mobile-web-app-capable","yes");v("apple-touch-fullscreen","yes");b?(a=new s(b),J(a)):p(o,function(b){a=new s(b);a.store();J(a)})}})(this);;Ext.blink({"id":"ba7734f5-ef3e-4477-bcea-70fb8b8a9663"})
        </script>
    The result is, I'll have the Sencha loader (appLoadingIndicator) appear, but the ST2 won't load.

    I also check if there is no javascript errors with Ripple but everything looks fine.

    I suppose there is a way to call the app.js code after being sure Phonegap is ready, but unfortunately I haven't been able to find it.

    Thanks for your help !

    Ocelyn

  2. #2
    Sencha User
    Join Date
    May 2012
    Posts
    38
    Vote Rating
    2
    Ocelyn is on a distinguished road

      0  

    Default


    I keep looking for a solution for my problem and using this index.html :

    PHP Code:
    <script type="text/javascript" charset="utf-8">
        var 
    app = {   
        
    initialize: function() {
            
    this.bindEvents();
        },    

        
    bindEvents: function() {
            
    document.addEventListener('deviceready'this.onDeviceReadyfalse);
        },    

        
    onDeviceReady: function() {
            
    app.receivedEvent('deviceready');
        },    

        
    receivedEvent: function(id) {

        
    alert('HERE 1');


            (function(
    i){function s(a){function b(a,j){
    alert('HERE 2');
    var 
    c=a.length,b,g;for(b=0;b<c;b++){g=a[b];var e=a,K=b,d=void 0;"string"==typeof g&&(g={path:g});g.shared?(g.version=g.shared,d=g.shared+g.path):(A.href=g.path,d=A.href);g.uri=d;g.key=h+"-"+d;f[d]=g;e[K]=g;g.type=j;g.index=b;g.collection=a;g.ready=!1;g.evaluated=!1}return a}var c;"string"==typeof a?(c=a,a=B(c)):c=JSON.stringify(a);var h=a.id,e=h+"-"+C+o,f={};this.key=e;this.css=b(a.css,"css");this.js=b(a.js,"js");this.assets=this.css.concat(this.js);this.getAsset=
    function(
    a){return f[a]};this.store=function(){t(e,c)}}function v(a,b){k.write('<meta name="'+a+'" content="'+b+'">')}function p(a,b,c){var h=new XMLHttpRequest,c=c||D,a=a+(-1==a.indexOf("?")?"?":"&")+Date.now();try{h.open("GET",a,!0),h.onreadystatechange=function(){if(4==h.readyState){var a=h.status,d=h.responseText;200<=a&&300>a||304==a||0==a&&0<d.length?b(d):c()}},h.send(null)}catch(d){c()}}function L(a,b){var c=k.createElement("iframe");m.push({iframe:c,callback:b});c.src=a+".html";c.style.cssText=
    "width:0;height:0;border:0;position:absolute;z-index:-999;visibility:hidden";k.body.appendChild(c)}function E(a,b,c){var d=!!a.shared;if(a.remote)b("");else{if(!d)var e=b,f=a.version,l,b=function(j){l=j.substring(0,f.length+4);l!=="/*"+f+"*/"?confirm("Requested: '"+a.uri+"' with checksum: "+f+" but received: "+l.substring(2,f.length)+"instead. Attempt to refresh the application?")&&M():e(j)};(d?L:p)(a.uri,b,c)}}function F(a){var b=a.data,a=a.source.window,c,d,e,f;c=0;for(d=m.length;c<d;c++)if(e=m[c],
    f=e.iframe,f.contentWindow===a){e.callback(b);k.body.removeChild(f);m.splice(c,1);break}}function G(a){"undefined"!=typeof console&&(console.error||console.log).call(console,a)}function t(a,b){try{n.setItem(a,b)}catch(c){if(c.code==c.QUOTA_EXCEEDED_ERR&&q){var d=q.assets.map(function(a){return a.key}),e=0,f=n.length,l=!1,j;for(d.push(q.key);e<=f-1;)j=n.key(e),-1==d.indexOf(j)?(n.removeItem(j),l=!0,f--):e++;l&&t(a,b)}}}function u(a){try{return n.getItem(a)}catch(d){return null}}function M(){H||(H=
    !
    0,p(o,function(a){(new s(a)).store();i.location.reload()}))}function w(a){function b(a,d){var b=a.collection,g=a.index,f=b.length,e;a.ready=!0;a.content=d;for(e=g-1;0<=e;e--)if(a=b[e],!a.ready||!a.evaluated)return;for(e=g;e<f;e++)if(a=b[e],a.ready)a.evaluated||c(a);else break}function c(a){a.evaluated=!0;if("js"==a.type)try{eval(a.content)}catch(b){G("Error evaluating "+a.uri+" with message: "+b)}else{var d=k.createElement("style"),c;d.type="text/css";d.textContent=a.content;"id"in a&&(d.id=a.id);
    "disabled"in a&&(d.disabled=a.disabled);c=document.createElement("base");c.href=a.path.replace(/\/[^\/]*$/,"/");x.appendChild(c);x.appendChild(d);x.removeChild(c)}delete a.content;0==--f&&h()}function h(){function b(){k&&c()}function c(){var a=r.onUpdated||D;if("onSetup"in r)r.onSetup(a);else a()}function e(){l.store();h.forEach(function(a){t(a.key,a.content)});c()}function g(a,b){a.content=b;0==--m&&(d.status==d.IDLE?e():i=e)}function f(){I("online",f,!1);p(o,function(c){q=l=new s(c);var e;l.assets.forEach(function(b){e=
    a.getAsset(b.uri);(!e||b.version!==e.version)&&h.push(b)});m=h.length;0==m?d.status==d.IDLE?b():i=b:h.forEach(function(b){function d(){E(b,function(a){g(b,a)})}var c=a.getAsset(b.uri),e=b.path,f=b.update;!c||!f||null===u(b.key)||"delta"!=f?d():p("deltas/"+e+"/"+c.version+".json",function(a){try{var d=b,c;var e=u(b.key),f=B(a),a=[],h,j,i;if(0===f.length)c=e;else{j=0;for(i=f.length;j<i;j++)h=f[j],"number"===typeof h?a.push(e.substring(h,h+f[++j])):a.push(h);c=a.join("")}g(d,c)}catch(k){G("Malformed delta content received for "+
    b.uri)}},d)})})}var h=[],k=!1,i=function(){},n=function(){d.swapCache();k=!0;i()},m;I("message",F,!1);if(d.status==d.UPDATEREADY)n();else if(d.status==d.CHECKING||d.status==d.DOWNLOADING)d.onupdateready=n,d.onnoupdate=d.onobsolete=function(){i()};!1!==navigator.onLine?f():y("online",f,!1)}var e=a.assets,f=e.length,l;q=a;y("message",F,!1);0==f?h():e.forEach(function(a){var c=u(a.key);null===c?E(a,function(c){a.remote||t(a.key,c);b(a,c)},function(){b(a,"")}):b(a,c)})}function J(a){null!==k.readyState.match(/interactive|complete|loaded/)?
    w(a):y("DOMContentLoaded",function(){navigator.standalone?setTimeout(function(){setTimeout(function(){w(a)},1)},1):w(a)},!1)}var D=function(){},m=[],k=i.document,x=k.head,y=i.addEventListener,I=i.removeEventListener,n=i.localStorage,d=i.applicationCache,B=JSON.parse,A=k.createElement("a"),z=k.location,C=z.origin+z.pathname+z.search,o="app.json",H=!1,q;if("undefined"===typeof r)var r=i.Ext={};r.blink=function(a){var b=u(a.id+"-"+C+o);v("viewport","width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no");
    v("apple-mobile-web-app-capable","yes");v("apple-touch-fullscreen","yes");b?(a=new s(b),J(a)):p(o,function(b){a=new s(b);a.store();J(a)})}})(this);;Ext.blink({"id":"ba7734f5-ef3e-4477-bcea-70fb8b8a9663"})
        

    alert('HERE 3');
        }
    };
        
    app.initialize();
        
    </script> 
    I wrote 3 alert, one before the Javascript part for Sencha, one after and one in the function sencha method.
    The first one is called but the others are not, so I guess there is a problem with the Sencha Part but I can't figure what it could be, is there a way to simply make a test inside of the receivedEvent function to check if Sencha is working? Or is Sencha not loaded yet when I call all this code and the last line Ext.blink({"id":"ba7734f5-ef3e-4477-bcea-70fb8b8a9663"}) is killing everything ?

    Thanks again for your help!

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    164
    Answers
    13
    Vote Rating
    9
    in4p will become famous soon enough

      0  

    Default


    Have you tried testing on a device using browser debugging? Or hooking up weinre?

  4. #4
    Sencha User
    Join Date
    May 2012
    Posts
    38
    Vote Rating
    2
    Ocelyn is on a distinguished road

      0  

    Default


    Hello in4p,

    Thank you for your answer,

    Well, when I'm using ripple with the plateform : Apache Cordova / Phonegap 2.0.0 everything works fine.
    If I'm using the plateform Webworks 2.0.0 I have the same result as on emulator, stuck on the sencha loading.
    But I have no Javascript error at all, and if I comment most of my code, still the same result.

    The only thing is on Webworks the deviceReady event won't fire, so I had to put all the Sencha Code inside of the receivedEvent method (see above) directly in the <script>.
    The code inside of my app.js or the first view seems to be called.

    What's weird is the deviceReady event fire on emulator.

    Another things who seems weird is in my log :
    I have this :

    Document was loaded from Application Cache with manifest http://localhost/mobile/Subway_Sub2S...cache.appcache
    Application Cache Checking event
    Application Cache NoUpdate event
    HERE 2


    Called 2 times, one before my app.js code is called and one after.
    The "Here 2" is a log I wrote inside of all the generate stuff from Sencha in index.html.

    And also I have this :

    Ripple :: Environment Warming Up (Tea. Earl Gray. Hot.) ripple.js:475
    webworks.handset :: Initialization Finished (Make it so.)


    called after the Sencha app.js code

    I really have no clue on what test I could do to make it work

    Thanks for your help again!

    Ocelyn

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    164
    Answers
    13
    Vote Rating
    9
    in4p will become famous soon enough

      0  

    Default


    Ocelyn,
    I have personally avoided using Ripple as I found that the results (at least in so far as wrapping Sencha with cordova are concerned) are sometimes inconsistent with the actual device. Which device are you targeting?

    I would suggest trying the following for wrapping in cordova for bb:
    https://github.com/apache/incubator-...berry-webworks

    You are correct regarding the deviceReady event. It does not execute - not really sure why, but I've seen the same behavior on devices. However, your code should still execute (i.e. I would revert back to the original). I encountered the same issue initially, and as I said, it was due to a javascript 'error'. I say 'error' as there was no error in the code, but for some reason the bb didn't like the javascript and threw an error. BUT.... I never saw that error when I ran the built 'production' or 'package' code.
    To debug, I suggest that rather than building the app, (via Sencha cmd) and then trying to wrap, use your pre-built code(original source) and try to wrap it. This was how I discovered what it didn't like about my code - for some reason this showed the javascript error.

  6. #6
    Sencha User
    Join Date
    May 2012
    Posts
    38
    Vote Rating
    2
    Ocelyn is on a distinguished road

      0  

    Default


    Hello in4p,

    I spent the last days trying to find a solution for my problem,

    Yes I'm wrapping my application with Webwork since the beginning, I was planning to export for OS6 at first but it seems webwork only allows you to export for 0S7 :
    https://developer.blackberry.com/htm...dk#smartphones

    I tried many solutions with different result.
    Trying to export with production mode : Stop at the SplashScreen

    Trying to export with testing mode : Stop at the SplashScreen too, I opened the js files to check if there is some error, but nothing, also I commented all the console.log() just in case.
    If I try to export with uncompressed files, my application is too large and won't be installed on Blackberry (around 15 meg)

    It's really annoying, I started to have no clue on the way I could fix that problem.
    Could you show me your index.html just in case ?

    Thank you,

    Ocelyn

Thread Participants: 1

Tags for this Thread