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

Native Development

Reply
New Developer
Posts: 12
Registered: ‎05-08-2012
My Device: PLAYBOOK
My Carrier: NA

set alarm event to launch an app.

hi,

anyon eknow of a way to schedule a alarm that will launch an app

e.g i want to lauch my app on 08:00:00 or launch my app after 1 hour from run...

is there any api that perform such function ?

regards

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

Re: set alarm event to launch an app.

This is not currently possible... No APIs exist that would allow it.

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!
New Developer
Posts: 12
Registered: ‎05-08-2012
My Device: PLAYBOOK
My Carrier: NA

Re: set alarm event to launch an app.

hmmm...i see...

 

i was wondering how do the current playbook alarm clock works ?

 

is there any time demon/service that i can register my app and add in an alarm event..

when the alarm reach it will launch my app..

 

in this way, i can't quit my app and save the battery life...

 

the alarm clock and calendar seems like able to do that....

 

nosure are they using the NDK api ?

 

 

 

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

Re: set alarm event to launch an app.

There are system-accessible APIs which are not yet exposed in any way for our own app's use. As I said, this is simply not possible, currently, at least for third-party apps.

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: 188
Registered: ‎01-27-2012
My Device: playbook
My Carrier: ...

Re: set alarm event to launch an app.

I suppose you could make a lightweight app that uses a Qtimer to trigger your app via QDesktopServices on the playbook.

QDesktopServices is working fine for launching the playbook email and browser applications now so it should also work fine to launch your app. I believe you need to get the app id via the bps navigator API somehow...

Obviously you would have to start the timer app manually so it is not a great solution... Just thought I would throw that out there...

Good luck!

Jon

 

New Developer
Posts: 12
Registered: ‎05-08-2012
My Device: PLAYBOOK
My Carrier: NA

Re: set alarm event to launch an app.

hi,

 

thanx for the advise..

 

think i can write a timer or light weight app..but i can't exit the app in background...

it will also consume battery power...

 

actually i want to add in schedule function to my cross platform TuYA apps..

http://kcuf.com.sg/blog/

 

i had already implemented it in wp7 and webOS..

http://kcuf.com.sg/blog/2012/03/updated-tuya-for-windows-phone/

 

they had time/service demon api that allow me register and add in alarm event...

 

i want to implement similar function in Playbook...but i'm unable to find any ways to implemnet it...:smileysad:

i was wondering..when the api will be out so that i can implement it...

 

 

 

 

 

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

Re: set alarm event to launch an app.

I don't personally expect an API for this until at least the first release of BB10 (i.e. some time in the fall), though maybe later. If it will be in the first release, it's possible we'll see the API released in the *beta* NDK some time during the summer.

I'd imagine this might involve the new "Invocation Framework", which is still in development. That will be the primary mechanism for most situations where one app launches another, though the main use cases generally seem to involve passing data to or from the invoked app.

In this case, I could see there being a system in place that allows you to register (programmatically, I would hope) your app for being launched at a specified time or after a specified delay, and a system service would do this via the Invocation Framework.

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!
New Developer
Posts: 12
Registered: ‎05-08-2012
My Device: PLAYBOOK
My Carrier: NA

Re: set alarm event to launch an app.

hi,

 

i see..

 

thanx for theinfo..

 

regards

 

BlackBerry Development Advisor
Posts: 668
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: set alarm event to launch an app.

While it's true that you can't exit your app and leave a timer running, your app would not be consuming any additional power if it is simply blocked waiting for the timer to expire.

 

See these docs on using timers:

https://bdsc.webapps.blackberry.com/native/documentation/com.qnx.doc.neutrino.getting_started/topic/...

New Developer
Posts: 12
Registered: ‎05-08-2012
My Device: PLAYBOOK
My Carrier: NA

Re: set alarm event to launch an app.

hi,

yap i understand about that..but it will still take up system resources..and user might accidentally exit the apps..

i think BB10 should have such a time demon/services feature as i think a mobile phone should have a scheduler task that support launching of apps when schedule is reach..

looks like i had to wait for the bb10 and in the near feature in order to in add in alarm scheduler in my TuYa App. :smileysad:

regards