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

Adobe AIR Development

Reply
Developer
Posts: 178
Registered: ‎04-16-2011
My Device: torch 9800
My Carrier: verizon
Accepted Solution

Playbook goes to sleep and my data transfer stops

hi,

 

I am testing my upload app and have found that when the playbook goes to sleep the transfer actually pauses until the backlight is enabled again.

 

Is this by design and is there a way around this so i can have my app continue to transfer data whilst the playbook is in sleep mode?

 

Thank you

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Playbook goes to sleep and my data transfer stops

It's by design, and apps that should really work differently need to implement specific measures to do so.  Look into the QNXSystemPowerMode stuff, and consider carefully whether you should be giving the user the option to control this, as some users may expect and want a transfer like that to be paused, depending on the nature of your app.  For some it's appropriate to just use THROTTLED, for others something more complex.

 

Also note that you'll want to requestResource() with an argument of QNXSystemResource.NETWORKING, and be sure to release it properly when you're done with it too.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 178
Registered: ‎04-16-2011
My Device: torch 9800
My Carrier: verizon

Re: Playbook goes to sleep and my data transfer stops

thank you, that is exactly the solution to my issue. When you say give the user the option to pause, would a http 1.1 server not mind if i just paused the transfer for a while?
Highlighted
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Playbook goes to sleep and my data transfer stops

If you pause the transfer for too long the server would likely time out. On the other hand, there are options such as using a Range request (that's a special request header field), that could let you make that a non-issue.

Don't make your app pause just because I suggested it... I have no idea what your app does, and maybe it's totally appropriate for you to simply complete any active transfer while in standby. Maybe it's appropriate to start the next one (if there is a "next one") or just to pause until the user activates the app again.

There's no firm rule about any of this, other than to carefully consider the full user experience, from the points of view of usability, desired functionality, battery life, etc. Try to think of ways in which certain types of users might think your implementation is completely wrong (the 1-star-review kind) and anticipate that by avoiding the problem or adding some configurability. Or even just clearly documenting the behaviour in your description so you can set the users' expectations to match how your app works.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!