Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
cesarramose
Posts: 2
Registered: ‎03-14-2012
My Device: Torch 9800
My Carrier: Digitel - Comcel

Re: Device memory is Low issue for an WebWork app

i have minimized my webworks code but i still get the low memory issue, i have put the files separated as suggested, but i think that what overloads my app it´s a picture gallery that has a carrousel of pictures every time a picture get´s changed the memory rises it´s there a more light method or any other way i can implement to do the carrousel? or to get rid of the memory issue?

Please use plain text.
New Contributor
willks
Posts: 3
Registered: ‎08-16-2012
My Device: Curve 9360, BOLD 9900
My Carrier: N/A

Re: Device memory is Low issue for an WebWork app

I think you summed it up for all of us. You should just go native and avoid yourself the heartache, frustration and ultimate baldness/psoriasis you will no doubt encounter when developing a large HTML5 app on a Blackberry.

We are developing a large app - and performance is just terrible.... terrible.
Please use plain text.
New Contributor
willks
Posts: 3
Registered: ‎08-16-2012
My Device: Curve 9360, BOLD 9900
My Carrier: N/A

Re: Device memory is Low issue for an WebWork app

I will elaborate more. Our large app, seems to just eat bow browser memory (as observed when looking at memory usage in debug mode).

Right now, memory usage is at 12Mb, and slowing down substantially. If I shutdown the app, then restart it - and view memory usage through Web Inspector - memory usage is where it was last time!

Pathetic!

Our code works, because when we run it through Chrome/Ripple - lick on the garbage collection button of the Chrome web inspector actually cleans up the dereferenced javascript objects.

Is this ever gonna get solved or should we just pull the plug on our project? Customer experience for applications on these devices just sucks - and I don't mean to rant, but I've been battling with this for months.

Oh - and MemoryMaid? So far it is useless for us - it cleans up java objects right? System.gc()? How does that fix our problem with javascript objects?

Now, there is my rant: Please, if anyone responds - tell me how the bloody hell to get this device to CLEAN JAVASCRIPT dereferenced objects (not Java, JAVASCRIPT!).

Thanks and have a pleasant day using an iPhone or Android device.
Please use plain text.
New Contributor
cesarramose
Posts: 2
Registered: ‎03-14-2012
My Device: Torch 9800
My Carrier: Digitel - Comcel

Re: Device memory is Low issue for an WebWork app

what it's even more frustrating it's that in newer versions of the blackberry smartphone also have the bug, so it's there anything that we can do?

 

 

Please use plain text.
New Contributor
willks
Posts: 3
Registered: ‎08-16-2012
My Device: Curve 9360, BOLD 9900
My Carrier: N/A

Re: Device memory is Low issue for an WebWork app

[ Edited ]

Yes exactly. We are planning on going live in the next week - and this issue is something we always thought we could manage as we thought it would be picked up and fixed during our performance enhancement phase.  We always thought it was our (mine) fault due to development bugs/issues etc etc.

I never for the life of me, thought that the device software itself could be an issue - which has made us re-think our entire Blackberry strategy altogether. Which is unfortunate for everyone.

 

:smileysad:

Please use plain text.
Contributor
vipintomer
Posts: 41
Registered: ‎05-03-2012
My Device: 9800 torch
My Carrier: -

Re: Device memory is Low issue for an WebWork app

There are some more issue like scroll using trackball with phonegap sencha app.

 

 

Which is not resolved in advanced phones still.

 

Blackberry.

Please use plain text.
Contributor
vipintomer
Posts: 41
Registered: ‎05-03-2012
My Device: 9800 torch
My Carrier: -

Re: Device memory is Low issue for an WebWork app

Hi Tim,

 

Is there some fixes for scroll with phonegap as we don't have the scrolling with elements when we fix the footer. like as below

 

 



var html_body='<div class="here"><img src="images/img_logo.png" />here for you...<div class="cl"></div></div><div class="hr-line"></div><div class="scroll-here" id="mainBodyDiv"><div class="ser-exp">when you are with airtel, your service experience is </div><div class="gray-bg">what you want, when you want.</div><div class="nav-here"><ul><li x-blackberry-focusable="true" id="1" x-blackberry-onUp="scrollHere()" x-blackberry-onDown="scrollHere()"><a href="#"><img alt="" src="images/icon_postpaid.png" />my mobile</a></li><li x-blackberry-focusable="true" id="2" x-blackberry-onUp="scrollHere()" x-blackberry-onDown="scrollHere()"><a href="#"><img alt="" src="images/icon_dsl.png" />broadband</a></li><li x-blackberry-focusable="true" id="3" x-blackberry-onUp="scrollHere()" x-blackberry-onDown="scrollHere()"><a href="#"><img alt="" src="images/icon_landline.png" />fixed line</a></li><li x-blackberry-focusable="true" id="4" x-blackberry-onUp="scrollHere()" x-blackberry-onDown="scrollHere()"><a href="#"><img alt="" src="images/icon_dth.png" />DTH</a></li></ul></div><div x-blackberry-focusable="true" id="5" x-blackberry-onUp="scrollHere()" x-blackberry-onDown="scrollHere()" class="gray-bg">pay your bills, recharge your phone, start & stop services, raise service requests & do lots more!  because you are special, we also bring to you offers carefully chosen exclusively for you at airtel. </div><div class="we-are">we are here for you...</div></div>';
var local_storage_name = 'tmpl_otp_xml';
var local_storage_name_at = local_storage_name+'_at';
var screen_xml_url = '';//url_lob;
var config_footer = '1';

var returnCallBack2 = function (xml){ //alert("init index.js ");
    Ext.getCmp("content").scroll= false;
    Ext.getCmp("content").setScrollable(false);
    //$(".pro-btn").removeAttr('style');
}

function scrollHere(){//alert("foucs");
    try{
    var elm = document.getElementById("mainBodyDiv");
    //var elm = $("#mainBodyDiv").html();
    //alert(elm);
    var lastFocusId = parseInt(blackberry.focus.getFocus());
    switch(blackberry.focus.getDirection()){
    case 2 : // up
    //alert("foucs up"+lastFocusId);
    if(lastFocusId <1 && lastFocusId > 7){ //lastFocusId less than first element and greater than last element
    blackberry.focus.setFocus((lastFocusId-1)+"");
    //elm.scrollTop -= 50; //height of single <li> element
    }else{
        blackberry.focus.setFocus((lastFocusId-1)+"");
        //if(lastFocusId <1 && lastFocusId > 7) elm.scrollTop -= 50;
    }
     elm.scrollTop -= 50;
     if(blackberry.focus.getFocus()=="20"){
        blackberry.focus.setFocus("5");
    }
    
    break;
    case 3 : // down
    //alert("foucs down"+lastFocusId);
    if(lastFocusId > 0 && lastFocusId < 7){
    blackberry.focus.setFocus((lastFocusId+1)+"");
    //elm.scrollTop += 50;
    }else{
        blackberry.focus.setFocus((lastFocusId+1)+"");
        //if(lastFocusId > 0 && lastFocusId < 7)  elm.scrollTop += 50;
    }
    elm.scrollTop += 50;
    if(blackberry.focus.getFocus()==lastFocusId){
        blackberry.focus.setFocus("20");
    }
    break;
    }
    }catch(e){
    //alert("errrrr- "+e);
}
}





function init(){//alert("init---index.js");
    /*  March 16 ,2012     By Mohit  Resolution PLUGIN */
     //localStorage.clear();
            //return;
            //(add the code below in try catch is for here for you screen flash issue dated 18 July 12).    
        try{
            if(registered!=null && registered == '1') {//alert(" is registerd-- "+registered);
            html_body='';
            config_footer = '11';
                //goto_last_lob();
                
            } else {
            if(window.localStorage.getItem("imageDownload")!=null && window.localStorage.getItem("imageDownload") == 2) {
                //alert("-- imageDownloaded-- "+window.localStorage.getItem("imageDownload"));
                html_body='';
                config_footer = '11';
                //redirectWindow("registration.html");

            }
            }
            }catch(e){
                //alert("ERRRRR"+e);
            }
            //
            returnCallBack = returnCallBack2;
            loadlobBodyContent(0);    
    
    /************************************/
    
}

Please use plain text.
Contributor
vipintomer
Posts: 41
Registered: ‎05-03-2012
My Device: 9800 torch
My Carrier: -

Re: Device memory is Low issue for an WebWork app

Hi have to use this line with every focusable element to scroll in the app but on very fast scroll it hangs my app.

 

please suggest some workaround to fix the scrolling issue we are using sencha with phonegap for this app

 

x-blackberry-focusable="true" id="4" x-blackberry-onUp="scrollHere()" x-blackberry-onDown="scrollHere()"

 

 

function scrollHere(){//alert("foucs");
    try{
    var elm = document.getElementById("mainBodyDiv");
    //var elm = $("#mainBodyDiv").html();
    //alert(elm);
    var lastFocusId = parseInt(blackberry.focus.getFocus());
    switch(blackberry.focus.getDirection()){
    case 2 : // up
    //alert("foucs up"+lastFocusId);
    if(lastFocusId <1 && lastFocusId > 7){ //lastFocusId less than first element and greater than last element
    blackberry.focus.setFocus((lastFocusId-1)+"");
    //elm.scrollTop -= 50; //height of single <li> element
    }else{
        blackberry.focus.setFocus((lastFocusId-1)+"");
        //if(lastFocusId <1 && lastFocusId > 7) elm.scrollTop -= 50;
    }
     elm.scrollTop -= 50;
     if(blackberry.focus.getFocus()=="20"){
        blackberry.focus.setFocus("5");
    }
    
    break;
    case 3 : // down
    //alert("foucs down"+lastFocusId);
    if(lastFocusId > 0 && lastFocusId < 7){
    blackberry.focus.setFocus((lastFocusId+1)+"");
    //elm.scrollTop += 50;
    }else{
        blackberry.focus.setFocus((lastFocusId+1)+"");
        //if(lastFocusId > 0 && lastFocusId < 7)  elm.scrollTop += 50;
    }
    elm.scrollTop += 50;
    if(blackberry.focus.getFocus()==lastFocusId){
        blackberry.focus.setFocus("20");
    }
    break;
    }
    }catch(e){
    //alert("errrrr- "+e);
}
}


Please use plain text.
New Contributor
sabroni
Posts: 9
Registered: ‎05-16-2012
My Device: 1
My Carrier: 2

Re: Device memory is Low issue for an WebWork app

Webworks apps are java apps that host a web view. I found the memory maid tweaks in this forum made a lot of difference to our webworks apps. Before they used to consume more and more memory till they crashed. Now they stop every 20 seconds or so while the little clock icon shows then the memory use is back down to what it should be (less than a meg). Mind you, we have also removed all photos and maps from the apps to make them work. And on some devices there are still horrible issues (on one blackberry we have we can only run one of our apps, if we start to run a second one we see it's splash screen then it shuts and takes any other webworks apps down with it!). So I guess it depends on your target platform whether there's any point in trying webworks.
Please use plain text.
New Contributor
abumathew
Posts: 7
Registered: ‎10-03-2012
My Device: 9800
My Carrier: AT&T

Re: Device memory is Low issue for an WebWork app

Were you able to find a solution for this memory issue with BlackBerry webworks? I am also facing the issue and any solution will be helpful.

Please use plain text.