Join Our 3 MILLION+ Members Today! Register Here | Login
Go Back   BlackBerry Forums at CrackBerry.com > BlackBerry Professionals > App Developers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
    Thread Author   #1  
Old 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
Thumbs up 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.
Reply With Quote Tip this Post
  #2  
Old 03-18-2010, 06:45 AM
CrackBerry Master
Device(s): 8900
Carrier: Aircraft
Pin: ing for the fjords
 
Location: Asia
Join Date: Dec 2009
Posts: 1,029
Likes Received: 1
Thanked 1 Time in 1 Post
Default

If you can solve this you will get a lot of business. There were several threads earlier, every product seemed unable to block the first ring.
__________________
The lesson we learned from iPhone: People who can't walk and chew gum at the same time don't need a phone that can multitask...nobody likes a phone to be smarter than they are Go RIM, Go BlackBerry. BlackBerry rules!
Reply With Quote Tip this Post
    Thread Author   #3  
Old 03-24-2010, 04:14 AM
CrackBerry Newbie
Device(s): 9530 (Storm)
Carrier: Verizon
 
Join Date: Mar 2010
Posts: 3
Likes Received: 0
Thanked 0 Times in 0 Posts
Default

thanks for your information.
Reply With Quote Tip this Post
Reply
BlackBerry Forums at CrackBerry.com > > BlackBerry Professionals > App Developers   Call block by code - getting one ring before the call blocks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes