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
Deepu_George_Jacob
Posts: 235
Registered: ‎12-13-2011
My Device: Curve 9380

How to run timer in background ?

Hi, 

 

I am trying to run timer in thubnail and hidden state . It excecute only one time. I am added permission "<permission>run_when_backgrounded</permission>" but still it won't work.I am worked the same thing in BBPlaybook(AIR) and Webworks(BB10). How can I solve this situvation.

 

Thanks with Regards

Deepu George Jacob

Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course

Re: How to run timer in background ?

By default, the AIR runtime switches to standby mode unless you explicitly tell it do do otherwise. But be very carefull when doing so, and make sure you understand how this works 100% before using it in a published app, otherwise it will drain your users battery and cause bad performance:

 

http://supportforums.blackberry.com/t5/Adobe-AIR-Development/Power-Management-Application-and-System...

 

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Developer
pyth
Posts: 508
Registered: ‎01-19-2011
My Device: My Trusty Red Plane

Re: How to run timer in background ?

here's an example by Julian Dolce how to get what you want (it's not a timer, it's an alarm that keeps the application awake)

 

https://github.com/blackberry/Samples-for-AIR/tree/bb10/ActiveFrameSample

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o
Developer
Deepu_George_Jacob
Posts: 235
Registered: ‎12-13-2011
My Device: Curve 9380

Re: How to run timer in background ?

Hi pyth, 

 

I am tested it. But QNXSystemEvent.ALARM is not triggering . Is any permission requred for that ?

 

Thanks

Deepu George Jacob

Developer
pyth
Posts: 508
Registered: ‎01-19-2011
My Device: My Trusty Red Plane

Re: How to run timer in background ?

it runs for me. Can you show me your bar-descriptor.xml?

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o