BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 11-21-2011, 02:37 PM   #1
aaratibb
New Member
 
Join Date: Nov 2011
Model: 9800
PIN: N/A
Carrier: AT&T
Posts: 3
Default how to get/listen to alarm on and dismiss notifications

Please Login to Remove!

i have a usecase where i need to stop media when alarm is triggered and restart music play once alarm is dismissed.

old forum posting suggested using BlackBerryEventList with PIMListListener to get event notifications. i have tried using it though I get only calender notifications. I am not getting any notification for alarms set.

What apis do i use to take action on alarm events?
Offline  
Old 11-21-2011, 03:09 PM   #2
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default Re: how to get/listen to alarm on and dismiss notifications

In my experience, the BB alarm pops a global-modal dialog, which deactivates your application (removes it from foreground).

Once the dialog is dismissed, you app is then "reactivated".

See the UiApplication class for "activate".
Offline  
Old 11-21-2011, 07:37 PM   #3
aaratibb
New Member
 
Join Date: Nov 2011
Model: 9800
PIN: N/A
Carrier: AT&T
Posts: 3
Default Re: how to get/listen to alarm on and dismiss notifications

Thanks
my code is not running on ui thread. thus I do not have access to UiApplication class.Any more ideas to make it work?
Offline  
Old 11-21-2011, 07:44 PM   #4
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default Re: how to get/listen to alarm on and dismiss notifications

It's possible that the system issues a global event for these alarms. If they do, it is undocumented (AFAIK).

You could set up a global event listener and see if you can "hack" something.
Offline  
Old 11-23-2011, 03:29 PM   #5
aaratibb
New Member
 
Join Date: Nov 2011
Model: 9800
PIN: N/A
Carrier: AT&T
Posts: 3
Default Re: how to get/listen to alarm on and dismiss notifications

So far no luck. i have tried, ALertlistener, GlobalEventListener, NotificationsEngineListener

GlobalEventListener gets some notification when i set alarm, thogh i am yet to figure out when it actually is triggered. i have seen it happen sometimes when I change date /time /am/pm on alarm scheduler and sometimes when i save alarm.

Though no event was received when alarm actually was started and dismissed :(. I bet there should be some way to do it.
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


VINTAGE Bruker Board DEC W4P3042 for SpectroSpin 250 picture

VINTAGE Bruker Board DEC W4P3042 for SpectroSpin 250

$99.99



DEC DIGITAL VINTAGE RA8X Control Panel picture

DEC DIGITAL VINTAGE RA8X Control Panel

$30.00



Original New DEC Digital DCJ11-AE 57-19400-09 Vintage CPU x 1pc picture

Original New DEC Digital DCJ11-AE 57-19400-09 Vintage CPU x 1pc

$100.00



Vintage Gray Metal MCM Industrial File Box w/Weis Jan-Dec and Daily Cards w/Tab  picture

Vintage Gray Metal MCM Industrial File Box w/Weis Jan-Dec and Daily Cards w/Tab

$14.75



Dec/Adac Corp. D4-10390 Rev 6 Model 1664ATTL Output Pulse Board 1983 (B16) picture

Dec/Adac Corp. D4-10390 Rev 6 Model 1664ATTL Output Pulse Board 1983 (B16)

$189.99



HSS 12pcs Valve Seat & Face Cutter 45dec 30dec 20dec for Vintage Car, Bikes ,Jee picture

HSS 12pcs Valve Seat & Face Cutter 45dec 30dec 20dec for Vintage Car, Bikes ,Jee

$235.94







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.