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
Contributor
Posts: 10
Registered: ‎03-22-2012
My Device: 9380
My Carrier: Vodafone

Memory Issues in Blackberry webworks App

Hi All,

 

can anyone please help me in solving memory issues in webworks app.

When I press menu key and select "Close" ,device waits for sometime(it shows blackberry cleaning timer) 9-10 sec.

Is there any way to close app instantly in blackberry webworks.

Can I put my app in background when close is pressed?

 

Is there any API so that I can handle memory allocated to memory eg.clear the memory occupied by images I am using in my app.

 

Can we register key events on Remote page.I tried this on one page but it gives me exception saying that "blackberry.ui.event" undefined.

is there any way to register remote page events.

 

Highlighted
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Memory Issues in Blackberry webworks App

>>When I press menu key and select "Close" ,device waits for sometime(it shows blackberry cleaning timer) 9-10 sec. Is there any way to close app instantly in blackberry webworks.

 

This is the existing "memory maid" feature built into the WebWorks SDK.  What it is doing is after detecting a 30% jump in memory usage, its cleans up after itself in order to remove a potential memory leak issue (with the underlying WebKit engine).  This hourglassing behavior does not always occur.

 

 

>>Can I put my app in background when close is pressed?

 

Yes, you can override the back button behavior

https://bdsc.webapps.blackberry.com/html5/apis/blackberry.system.event.html

 

<script>
  function trapForBackKey() {
    blackberry.system.event.onHardwareKey(blackberry.system.event.KEY_BACK, handleBack);
  }

  function handleBack() {
    blackberry.app.requestBackground();
  }
</script>

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.