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 Developer
Krish
Posts: 4
Registered: ‎02-03-2009
My Device: Not Specified

How to invoke J2ME application from Browser?

Hi,

 

I am trying to write a content Handler( JSR 211). I want this content handler to be invoked if user receive specific content type while working with device browser ?

 

any help in this regard will be appreciated.

 

Also is it possible to test this with JDE4.7 emulator ? if yes how ?

 

Thanks,

Krish

Developer
Posts: 107
Registered: ‎09-25-2008
My Device: Not Specified

Re: How to invoke J2ME application from Browser?

Look at the classes in net.rim.device.api.browser.field. You need to wrap your handler in a BrowserContent implementation and register it with the browser.
New Developer
Krish
Posts: 4
Registered: ‎02-03-2009
My Device: Not Specified

Re: How to invoke J2ME application from Browser?

Thanks for the reply.

 

Please note that here i am not talking about programming black berry browser. Actually when I am saying device Browser, it means that a user is browsing a particular site on standard internet browser. Once  a particular content type is returned from server, it should invoke my custom application to handle that.

 

 

Thanks,

 

 

Developer
Posts: 107
Registered: ‎09-25-2008
My Device: Not Specified

Re: How to invoke J2ME application from Browser?

Yes, the api.browser.field classes can be used in two ways. One is to embed a browser field into your application. The other is to provide specific content handlers (i.e. plugins) to the standard browser. Specifically, look at the net.rim.device.api.browser.plugin.BrowserContentProviderRegistry class, you can register a BrowserContentProvider that accepts certain mime types, and when the user is using the standard browser and encounters a file with that mime type, your plugin will be invoked.
New Developer
Krish
Posts: 4
Registered: ‎02-03-2009
My Device: Not Specified

Re: How to invoke J2ME application from Browser?

Again Thanks for reply But I still have doubt.

 

Here I want to invoke a J2ME applicaiton installed on phone, Will this API be able to do that ? As per document it seems that you can only change look and feel of the browser by provided addition menus or by providing specific settings.

 

Also  you can only extent BrowserContentProvider while registring with BrowserContentProviderRegistry. BrowserContentProvider does not provide a way to invoke another application.

 

Also if this is possible where will i Write code for  registring my BrowserContentHandler with BrowserContentProviderRegistry as I will only write a J2ME application and jad file will provide a way to register content handler. 

 

When my code will be invoked ?

 

also it will be great help if you can provide me same sample code if it is possible.

 

Thanks in advance.

Developer
Posts: 107
Registered: ‎09-25-2008
My Device: Not Specified

Re: How to invoke J2ME application from Browser?

I think there is a sample browser plugin included in the JDE samples workspace. You can look at that and see if it fits your needs.
BlackBerry Development Advisor
MSohm
Posts: 14,757
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: How to invoke J2ME application from Browser?

Please refer to the chapidemo included with the BlackBerry JDE for an example on using the JSR 211 content handler APIs.  The BlackBerry Browser does not support third party plug-ins.  You can customize a browser field used within your own Java application to display unique mime types, however this does not affect the BlackBerry Browser.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker