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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Developer
Posts: 27
Registered: ‎01-11-2009
My Device: Not Specified

[initiate Call and get Dialog keyDown event]

Dear all,

    I have two Questions:

1- How to initiate phone call.

2- Iam using Dialog.ask and Dialog.inform....if the user press the send key or end key will go out of my application i want to override the keydown function of the default dialog class and handle the keydown action , How to do that ?

 

Thanks

Wael Nabil

Developer
Posts: 238
Registered: ‎08-26-2008
My Device: Not Specified

Re: [initiate Call and get Dialog keyDown event]

Hi,

 

1. 

PhoneArguments pA = new PhoneArguments(ARG_CALL, numberToCall);

Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, pA));

2.

ask returns an int value of the selected choice!

 

Regards,

Jochen

New Developer
Posts: 27
Registered: ‎01-11-2009
My Device: Not Specified

Re: [initiate Call and get Dialog keyDown event]

Dear ,

     Thanks for your answer..

About the secound Question seem i didn't success to explain it.

My Question Not about how to get the selected button from this dialog "Yes or No"  or like that

My Question about while this dialog is focused the user may click on the Green Send Key which show the Call list and i want to prevent that So is there any way to get the KeyDown event while this Dialog is shown 

Thanks

Wael Nabil

Developer
Posts: 293
Registered: ‎02-25-2009
My Device: Not Specified

Re: [initiate Call and get Dialog keyDown event]

protected boolean keyDown(int keycode,
int time)
Just override this method. When you will press, green key, this method will return you the keycode of pressed key. just consume the event on specified key and you will be able to prevent any action on presssing green key.
New Developer
Posts: 27
Registered: ‎01-11-2009
My Device: Not Specified

Re: [initiate Call and get Dialog keyDown event]

Thanks for the answer

But this will apply only on your screen example you make a class extends MainScreen

but if i show Dialog by Dialog.inform or Dialog.ask this is as another screen over my main screen so it has another keyDown.

my Question is how to override this Dialog keyDown.

 

Thanks

Wael Nabil

Highlighted
Developer
Posts: 293
Registered: ‎02-25-2009
My Device: Not Specified

Re: [initiate Call and get Dialog keyDown event]

have you tried withoverridinbg keyChar() there ?