 Thread Author
# 1

03-18-2010, 06:43 AM
|
| CrackBerry Newbie Device(s): 9530 (Storm) Carrier: Verizon | | Join Date: Mar 2010 Posts: 3 Likes Received: 0
Thanked 0 Times in 0 Posts
| |
Call block by code - getting one ring before the call blocks  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);
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. I m Using Strom 9500 and JDE 4.7.0 for development. |