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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Regular Contributor
nyerunkar
Posts: 67
Registered: ‎12-30-2010
My Carrier: Vodafone.

Execute native function from BrowserField

hello friends., in my application i used browserfield2 for display web Pages ., in web pages contain javascript code ., So is it possible to call native function from JavaScript which is in my webpages......?
Thanks .,
Nilesh .
Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
My Carrier: Bell

Re: Execute native function from BrowserField

You can create JavaScript extensions that call Java APIs, and use those JavaScript APIs in your BrowserField2 application.  Read this for more information.

 

Using JavaScript extensions

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Regular Contributor
nyerunkar
Posts: 67
Registered: ‎12-30-2010
My Carrier: Vodafone.

Re: Execute native function from BrowserField

Thanks for reply.,

 

i'm not using webworks ... i'm using native java ...

please give me any sample code ...

Thanks .,
Nilesh .
Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
My Carrier: Bell

Re: Execute native function from BrowserField

WebWorks is Java under the covers.  The SDK packages web assets and uses them from a BrowserField2.  

 

FYI there is a WebWorks build option that will provide you with the .java source files it generates for your application.

 

JavaScript extensions can be used in a full Java application as well.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Regular Contributor
nyerunkar
Posts: 67
Registered: ‎12-30-2010
My Carrier: Vodafone.

Re: Execute native function from BrowserField

thanks for correct me...

i need to read regarding web works ...

Thanks .,
Nilesh .
Please use plain text.
Developer
huddarveena
Posts: 83
Registered: ‎12-12-2011
My Carrier: Robosoft

Re: Execute native function from BrowserField

Hello @nyerunkar, did u find solution to the question asked about executing native from BrowserField? If found any solution kindly guide me with the same, as I too have same requirement. Thanks in advance.

Please use plain text.