Hi, I have written code to block the calls. I m automatically invoking the key event to cut the call when the call arrives. The call is blocked as expected but I m getting one ring before the call blocks. I try to minimize the master volume to 'zero' and set the same after the call ends.
int master_volume= net.rim.device.api.system.Alert.getVolume();
//net.rim.device.api.notification.NotificationsManag er.getMasterNotificationVolume();
System.out.println("Master Volume "+master_volume);
net.rim.device.api.system.Alert.setVolume(0);
System.out.println("Master Volume after setting "+net.rim.device.api.system.Alert.getVolume()) ;
System.out.println("Master Volume 1 after setting "+net.rim.device.api.notification.NotificationsMan ager.getMasterNotificationVolume());
EventInjector.KeyCodeEvent ev1 = new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_DOWN, ((char) Keypad.KEY_END), KeypadListener.STATUS_ALT, 100);
EventInjector.invokeEvent(ev1);
net.rim.device.api.system.Alert.setVolume(master_v olume);
System.out.println("Master volume 2 "+master_volume);
:amish:Also below is the debugger output.
Master Volume 100
Master Volume after setting 0
Master Volume 1 after setting 70
Master volume 2 100
The NotificationManager volume too has the same effect when using.
I do not want even one ring when the call rises.
:1244::amish:I m Using Strom 9500 and JDE 4.7.0 for development.









Reply With Quote


