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


Voltage Electricity Tester Volt Detector Test Pen AC Non-Contact Sensor 90-1000V picture

Voltage Electricity Tester Volt Detector Test Pen AC Non-Contact Sensor 90-1000V

$15.94



SQUARE D Wiggy® VOLTAGE TESTER Type: VT-1, Class: 6610, Series: A picture

SQUARE D Wiggy® VOLTAGE TESTER Type: VT-1, Class: 6610, Series: A

$79.99



12V Digital LED Display Voltmeter Voltage Gauge Panel Meter for Car Motorcycle picture

12V Digital LED Display Voltmeter Voltage Gauge Panel Meter for Car Motorcycle

$6.49



Power Queen 500A Battery Monitor with Shunt High Low Voltage Programmable Alarm picture

Power Queen 500A Battery Monitor with Shunt High Low Voltage Programmable Alarm

$57.99



LED AC Electric Voltage Power Detector Sensor Tester Non-Contact Pen 12-1000V picture

LED AC Electric Voltage Power Detector Sensor Tester Non-Contact Pen 12-1000V

$12.49



Type-C USB Digital Meter Tester Multimeter Current Voltage Power Monitor + Cable picture

Type-C USB Digital Meter Tester Multimeter Current Voltage Power Monitor + Cable

$19.98







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