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
New Contributor
paitandi1985
Posts: 6
Registered: ‎08-08-2013
My Device: BB7
My Carrier: Blackberry

Not able to Close blackberry 7 browser from my native applicatiion

     Thanks! I am developing a BlackBerry 7 mobile native application. On click of button from my native application. It will be open a new URL in a separate browser. So, I want to close the opened browser. The open URL is separate domain, but that domain is returnning a page, that is actually my page, in this page i have tried following code. But, it is not working - 

 

      blackberry.app.exit(); window.close();System.exit();

     

          I have tried to open the URL in my native application using iframe. But, here always taking me splash screen instead of loading URL. So, please tell me any way due to I can access the url inside my blackberry 7 application and I have controll over the opened website. Or any other way to close the opened browser. To develp this project I am using HTML5, JQuery Mobile and BB WebWorks.

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Not able to Close blackberry 7 browser from my native applicatiion

Hi there, you won't be able to close the native browser with a JavaScript command on a web page. You would navigate to your remote URL with something like setting window.href; or something similar though. If your entire application is remotely hosted, you can simply set the URL in your config.xml to load the remote page (instead of loading index.html and invoking the browser.)

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.