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

Web and WebWorks Development

Reply
Contributor
aadrat
Posts: 25
Registered: ‎11-10-2010
My Device: Not Specified
Accepted Solution

Overriding Back Button behavior

I am developing my widget on BlackBerry WebWorks Plug-in for Eclipse v2.5.1. I am using single HTML file for all my screens.

Right now Back button is exiting from application itself. I have tried to check/uncheck 'Override the default back button behavior to exit application' option but no luck.

And I want to disable Back button on Home Screen but could not find any document to override its behavior.

Let me know you need more information

 

Please help.

 

Thanks.

 

 

Please use plain text.
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Overriding Back Button behavior

Take a look at the onHardwareKey() event that you can trap to be able to make the Back Button do whatever you like :smileyhappy:

 

http://www.blackberry.com/developers/docs/widgetapi/blackberry.system.event.html

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Contributor
aadrat
Posts: 25
Registered: ‎11-10-2010
My Device: Not Specified

Re: Overriding Back Button behavior

Thanks.:smileyvery-happy:

Please use plain text.
New Contributor
bvitale
Posts: 2
Registered: ‎02-22-2011
My Device: Not Specified

Re: Overriding Back Button behavior

I'm having a similar problem. I have a jQueryMobile site packaged into WebWorks. I'm using the Torch 9800 6.0 simulator. When I use the hardware back button, it exits the application rather than navigating back through the history.

 

When I access the jQueryMobile site in the normal browser, the hardware back button does the right thing.

 

The jQueryMobile team has said this is broken on BB5 but should work on BB6. (link)

 

I've also toggled the checkbox back and forth to no avail.

 

Any suggestions?

Please use plain text.
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Overriding Back Button behavior

Hi bvitale,

 

Could you possibly create a new post on the forum with this question.  I fear that asking it on a thread marked "solved" may have it go unseen.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.