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
Developer
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified
Accepted Solution

Key Event on Blackberry Embedded Browser.

Hi all,

 

I am opening payment gateway in hte blackberry embedded browser.

Once the transaction is completed am calling a webservice to confirm whether the transaction is completed or not, based on this result I need to display the user an alert.

 

I want to know when the user closes the browser so as to display the alert according to the success of failure of the transaction.

 

Is there any possibility to detect the 'Esc' event or any other event that tells about the close of the Blackberry browser ?

 

 

Thanks and Regards,
PraveenGoparaju.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Key Event on Blackberry Embedded Browser.

I am not aware of any way to do this.  Actually I would suggest that it is not necessarily an appropriate thing to do, since the user may switch back to your Application without exiting the Browser.  So I would use the return to your Application to trigger your web service call.  There are two options:

a) Create an onExposed() method, when you start the Browser set a flag, and then, in your onExposed() method, if the flag is set, you have returned from the Browser session and can check. 

b) Do the same sort of processing but use Application methods deactivate() and activate(). 

Developer
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified

Re: Key Event on Blackberry Embedded Browser.

Hi peter,

 

Many Thanks for your reply.

 

I presume, the onExposed() you are refering is Screen.onExposed();

I will let know the result.

 

 

Thanks and Regards,
PraveenGoparaju.
Developer
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified

Re: Key Event on Blackberry Embedded Browser.

Many Thanks peter.....

 

onExposed() worked like a charm !!!!

 

 

 

Thanks and Regards,
PraveenGoparaju.