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 Member
Posts: 1
Registered: ‎05-09-2011
My Device: Playbook
My Carrier: Vodafone

Application freezes when PlayBook goes into standby

Has anyone run into the issue where the an application will freeze when the device (BlackBerry PlayBook) goes into standby mode?

 

We haven't yet got our PlayBook as we live in New Zealand and they haven't started selling them here yet. We qualified for the free PlayBook but that hasn't been shipped yet. This is a really hard bug to track down without the actual device.

 

I found an old forum post: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/setTimeout-and-setInterval-not-w... which may be causing the issue.

 

Thoughts?

New Contributor
Posts: 2
Registered: ‎05-09-2011
My Device: Developer
My Carrier: Developer

Re: Application freezes when PlayBook goes into standby

The app runs using a setInterval loop. Drawing is done using a canvas.

 

onload
{
	setInterval(Update, 1000 / 60)
}

 

We previously had some code that was in there to make the app sleep in the background and wake it when it returned to the foreground, otherwise the simulator made it look like the app ran all the time.

We have since removed this and we are still seeing the issue.

 

onload()
{
...
	_interval = setInterval(Update, 1000 / 60);
	blackberry.app.event.onBackground(HandleBackground);
	blackberry.app.event.onForeground(HandleForeground);
}

...

	HandleBackground: function ()
	{
		clearInterval(_interval);
	},
	HandleForeground: function ()
	{
		_interval = setInterval(Update, 1000 / 60);
	}

 

Anyone else ran into this issue?

Or even not ran in to this issue with a similar runloop?

Highlighted
New Contributor
Posts: 2
Registered: ‎05-09-2011
My Device: Developer
My Carrier: Developer

Re: Application freezes when PlayBook goes into standby

We've implemented http://devblog.blackberry.com/2010/05/working-around-the-backlight-timeout/ and resubmitted.

Hopefully that fixes it... Wheres our playbook!? :-)