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


Lot of OEM APPLE iPAD LCD And White Front Glass Replacement 6091l-1402C picture

Lot of OEM APPLE iPAD LCD And White Front Glass Replacement 6091l-1402C

$17.99



A1618 NEW OEM Battery for MacBook Pro 15

A1618 NEW OEM Battery for MacBook Pro 15" Retina A1398 Mid 2015 020-00079

$43.90



Genuine A1417 OEM Battery Apple Macbook Pro 15 Retina A1398 Mid 2012 Early 2013 picture

Genuine A1417 OEM Battery Apple Macbook Pro 15 Retina A1398 Mid 2012 Early 2013

$40.90



NEW OEM Battery A1466 A1369 A1496 A1405 A1377 A1466 for MacBook Air 13 inch picture

NEW OEM Battery A1466 A1369 A1496 A1405 A1377 A1466 for MacBook Air 13 inch

$31.90



NEW OEM A1618 Battery for Apple MacBook Pro 15” Retina 99.5Wh A1398 Mid 2015 picture

NEW OEM A1618 Battery for Apple MacBook Pro 15” Retina 99.5Wh A1398 Mid 2015

$43.90



OEM Battery for MacBook Pro 17

OEM Battery for MacBook Pro 17" A1309 A1297 Early 2009 Mid 2009 2010 MC226

$40.90







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