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


EMC2 HPE-S HPES Server picture

EMC2 HPE-S HPES Server

$465.00



Server SE-SS 07020 Server Express Single Drop-In - NEW - COMPLETE - Genuine OEM picture

Server SE-SS 07020 Server Express Single Drop-In - NEW - COMPLETE - Genuine OEM

$199.99



Multitech Systems V.34 FF440 FaxFinder Fax Server 4 Port picture

Multitech Systems V.34 FF440 FaxFinder Fax Server 4 Port

$449.94



NEW MOXA NPORT W2150A serial server DHL Fast delivery picture

NEW MOXA NPORT W2150A serial server DHL Fast delivery

$379.44



Commercial 6 Pans Food Warmer Steam Table Countertop Buffet Server Bain Marie picture

Commercial 6 Pans Food Warmer Steam Table Countertop Buffet Server Bain Marie

$306.23



USED Moxa NPort5610-16 16-port RS-232 Serial Communication Server picture

USED Moxa NPort5610-16 16-port RS-232 Serial Communication Server

$284.58







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