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
Highlighted
Developer
Posts: 142
Registered: ‎06-26-2009
My Device: Not Specified

How to launch app from browser

Hi,

How to launch the installed application on device from the blackberry browser. My application details:

Without login credentials user cannot have further access of application, so on application start there are two button one for Registration and other for Log in. Here is how it has to work.

  1. Unregistered user start the app, clicks the Registration button.
  2. Invoke BB browser with registration url.
  3. User completes the registration process and on successful registration the page will have link to launch app.

Is there any possibilities in bb for this. where as in iPhone it is possible.

Regular Contributor
Posts: 77
Registered: ‎09-19-2008
My Device: Blackberry 8320
My Carrier: Airtel India

Re: How to launch app from browser

[ Edited ]

Just a thought, why cant you use BrowseField, BrowseField2 instead of launching a mobile browser?

 

Else here is another way (I have sone small research a 2 years back)

 

1. Extend your pugin class (say "Loader") with BrowserContentProvider

2. Override methods available in BrowserContentProvider

3. In "public BrowserContent getBrowserContent(BrowserContentProviderContext context)", get the browser content and parse. Look if you have required data in content, if yes launch your application.

 

Note, you have to register the Loader plugin class with Content provider regitry (above one),

 

BrowserContentProviderRegistry pluginRegistry = BrowserContentProviderRegistry.getInstance();
pluginRegistry.register(new Loader());

This registry code should be executed before your app open browser for registration.

 

Let me know if it is helpful.

   

 

Developer
Posts: 142
Registered: ‎06-26-2009
My Device: Not Specified

Re: How to launch app from browser

Thanks ManikandanP for ur reply,

 

Actually its client requirement for using mobile browser instead of BrowserField inside the application. He wants something similar fuctionality as done iPhone. For Ex: In my application i will register the one unique url and say i closed app, opened the browser and will type the same registered url on browser then browser should able to launch my app.

 

can any one please help me on this feature.

 

Regular Contributor
Posts: 77
Registered: ‎09-19-2008
My Device: Blackberry 8320
My Carrier: Airtel India

Re: How to launch app from browser

Did you try approach (3 steps) which I have explained?

 

In step 3, using parameter object you can get URL,

context.getHttpConnection().getURL()

 

However we have to check whether we will be able to close the browser on launch of your application.