Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
vinho
Posts: 28
Registered: ‎08-19-2008
My Device: Not Specified

Re: Call Control functions like answer/reject/disconnect/hold

Is it still no any way to do call control in 4.6/4.7 API?

Our product really needs to have such functions for insturcting the phone to answer/reject/disconnect/hold the calls.

Please use plain text.
Developer
myraddin
Posts: 405
Registered: ‎09-12-2008
My Device: 9000 9810

Re: Call Control functions like reject/disconnect

Anyone still interested?

I found it. (only for reject though -> the one that those commercial apps use)

 

PM me for the solution.

If enough interesents show up, I will post to the public.

 



"Listen carefully, I shall say this only once"
Please use plain text.
New Developer
neek2000
Posts: 9
Registered: ‎11-12-2008
My Device: Not Specified

Re: Call Control functions like reject/disconnect

Hi myraddin

 

I have been send you a PM.

 

Tanks.

Please use plain text.
Developer
myraddin
Posts: 405
Registered: ‎09-12-2008
My Device: 9000 9810

Re: Call Control functions like reject/disconnect

[ Edited ]

By the Olimp...

 

I don't see why not.

 

Edit: Sorry I like you all. Please don't hold the deleted lines against me


So this is it:

 

1) implement phone listener.

2) on callIncoming() use getScreen... getMenu...

3) List the menuItems from that menu.

4) one of these items will be "end call" use MenuItem.Run()

 

That's it.

 

Enjoy.

 

For other tricks just browse the docs and this forum.

(I still don't know how to accept tha call though ;( )

 

Happy coding.

 

P.S. Noobs use this: Ui.getUiEngine().getActiveScreen().getMenu(0).getItem(X).run()

 

I like Kudos :smileywink:

Message Edited by myraddin on 11-12-2008 05:06 PM
Message Edited by myraddin on 11-12-2008 05:13 PM


"Listen carefully, I shall say this only once"
Please use plain text.
New Developer
neek2000
Posts: 9
Registered: ‎11-12-2008
My Device: Not Specified

Re: Call Control functions like reject/disconnect

It work well, thank you!

 

You give me a new way to the BlackBerry, Thx.

Please use plain text.
New Developer
ehartwell
Posts: 22
Registered: ‎08-13-2008
My Device: Not Specified

Re: Call Control functions like reject/disconnect

Looking for the "end call" text only works when the device's language is English. How about looking at the menu ordinal:

 

if (menuitem.getOrdinal( ) == 69632) // 0x11000

The ordinal seems to be 69632 (0x11000) in all the OS versions I've tried. Anybody find a case where it's not?

Please use plain text.
Developer
myraddin
Posts: 405
Registered: ‎09-12-2008
My Device: 9000 9810

Re: Call Control functions like reject/disconnect

good tip.

But you must be sure it works on every device/OS series/version?

 

I resolved the issue by changing the locale to 'en' right before comparison. Then switching it back immediatelly after.



"Listen carefully, I shall say this only once"
Please use plain text.
New Developer
devguy
Posts: 86
Registered: ‎11-19-2008
My Device: Not Specified

Re: Call Control functions like reject/disconnect

Hi guys,

I'm just starting with the JDE, so please excuse me for the newbie question...

Would you please show me the code to find the menuitem by text (end call) or by id? I looked at the RIM docs for the Menu class, but I found no enumerator/method to get the complete list of contained menu items...

Also, how to extract the text/caption of a menu item?

 

Thanks a lot for your help!

Please use plain text.
Developer
simon_hain
Posts: 15,947
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Call Control functions like reject/disconnect

menu.getsize(): number of menuitems.
menu.getitem(int position): maybe you can connect the two functions.
menuitem.tostring(): text of the menu item
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
New Developer
devguy
Posts: 86
Registered: ‎11-19-2008
My Device: Not Specified

Re: Call Control functions like reject/disconnect

thanks a lot, I'll try this.

One more related question, if I may. Yesterday, before knowing what you just tought me, I tried to just get items 0 and 1, thinking that there were only two items in the main menu...the two items that I see when I manually open that menu in the device (accept / end call). However none had ordinal = 69632, the value mentioned earlier. How is that? Are there more menu items that are just invisible when there's an incoming cal, but they still are present in the collection?

Thanks.

 

Please use plain text.