09-24-2009 12:53 AM
I am looking at the NotificationDemo from the 4.7.0 SDK. And I note that you have to use this one as the ones that come with 4.3.0 is buggy (dialog does not popup more than once).
So here are the steps.
- Grab the sample from 4.7.0 SDK.
- Comment out the Alert.startBuzzer and Alert.startAudio. (Basically disable Alerts stuff).
- Build it using 4.3.0 SDK. Run it using Bold Simulator.
- On the simulator, goto the sound profile and choose the new registered profile "Notification Demo" choose a tone that is fairly long. I used Notifier_Eurotrance.
The problem is the notification event sound. It won't stop when you click on "Ok" on the dialog using the navigation wheel and you will have the sound playing until it finishes.
If I use enter key instead, the sound will end. So it seems that programmatically cancelling notifications event will not stop the sound at all. However pressing hardware keys like space, enter, volume down, escape will also stop it, but not the navigation wheel click.
Is this a known issue with cancelDeferredEvent and cancelImmediateEvent will not stop the sound?
09-24-2009 04:25 PM
In an effort to get more interest. Here is a very simple application to show the issue.
Remember to set the notification to a long tune after running the app.
package com.NotificationBug; import net.rim.device.api.notification.NotificationsConst
ants; import net.rim.device.api.notification.NotificationsManag er; import net.rim.device.api.ui.MenuItem; import net.rim.device.api.ui.UiApplication; import net.rim.device.api.ui.container.MainScreen; public class NotificationBug extends UiApplication { public static final long NOTIFICATION_BUG_ID = 0xDC5bf2f34274ABCL; private Thread _thread; // thread that cancels the event after 1 second public static void main(String[] args) { new NotificationBug().enterEventDispatcher(); } public NotificationBug() { // registration of the source NotificationsManager.registerSource( NOTIFICATION_BUG_ID, new Object() { public String toString() { return "Notification Bug Event"; } } , NotificationsConstants.CRITICAL ); MainScreen screen = new MainScreen() { public boolean onClose() { return super.onClose(); } }; screen.setTitle("Notification Bug"); screen.addMenuItem(new MenuItem("Trigger", 10000, 10000) { public void run() { FireEvent(); } }); pushScreen(screen); } public void FireEvent() { System.out.println("Firing Event"); NotificationsManager.triggerImmediateEvent(NOTIFIC ATION_BUG_ID, 0, this, null); if ( _thread == null ) { // this create a thread that will start off sleeping for 1second and // then cancel event. _thread = new Thread() { public void run() { try { sleep(1000); } catch ( InterruptedException e ) { // TODO Auto-generated catch block e.printStackTrace(); } StopEvent(); _thread = null; super.run(); } }; _thread.start(); } } public void StopEvent() { System.out.println("Stopping Event"); NotificationsManager.cancelImmediateEvent(NOTIFICA TION_BUG_ID, 0, this, null); } }
03-08-2010 01:27 PM
I'm seeing the exact same issue. My test platform is Bold 9000 running firmware 4.6.0.304
04-19-2010 12:25 AM
Hi all, I need to call ID:2868625504212929965L,but the project runing,Setting Simulator "Option"-->"Sounds and Ring Tones" can't open and quote some mistakes, pls help me,Thanks All.
05-29-2012 11:27 AM