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
Posts: 7
Registered: ‎04-09-2012
My Device: Playbook
My Carrier: Koodo

Java Extensions...

JAVA extensions.... I don't quite understand how to get this to work.

 

I've downloaded the Blackberry Java Plugin 1.5.0...

 

I've copied and pasted the sample code from the documentation...

 

Assuming I made the Jar correctly....  (no documentation on any special options that may need to be selected or deslected... Found some help on another site which copied the tutorial from the documentation but just added the JAR compling part)

 

Now where do I put this Jar file??.. in the ext directory for the SDK??.. in my web app root folder???... The documentation is lacking a bit here.

 

How do I setup the directory structure for the extension??.

 

Any help would be appreciated.

 

Please don't direct me to the tutorials... Thats where I got the sample.alert from.. Also the other tutorials I find are just copies of what is in the documentation.  All the github examples seem to be using AIR and none use the JAR format which is only one explained in the documentation.

 

Thanks

Mark

 

 

Contributor
Posts: 44
Registered: ‎12-01-2009
My Device: Not Specified

Re: Java Extensions...

The compiled jar file should be in the EXT directory of your WebWorks app... (Are you looking at this tutorial page which outlines how to import the jar file? http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Using-JavaScript-Extensions-in-y... )

New Developer
Posts: 7
Registered: ‎04-09-2012
My Device: Playbook
My Carrier: Koodo

Re: Java Extensions...

Thanks for the quick response.

 

I've tried copying the jar into the web app root folder under 'ext'... and setup the config.xml with the feature... still doesn't work though.

 

I followed the link you provided above.. tried downloading the sample code at the end... Zipped it.. complied it using ripple then put it onto the tablet... still doesn't load the extension.  

 

The page comes up.. but the javascript has no clue what "sample" is.  Error:  "Can't find variable: sample".

 

Mark

 

 

Contributor
Posts: 44
Registered: ‎12-01-2009
My Device: Not Specified

Re: Java Extensions...

And I have found your issue... PlayBook extensions and Smartphone extensions are not the same thing... 

 

Check this out: http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Creating-AIR-Native-Extensions-fo...

 

R

New Developer
Posts: 7
Registered: ‎04-09-2012
My Device: Playbook
My Carrier: Koodo

Re: Java Extensions...

Thanks for the link.  That helps a bit.. However that is for making an extension to be used in an AIR app.  Need to be able to use it in a Webworks app. 

 

So I even tried downloading the "Sleep" example of github and installed is as per the instructions.... Webworks doesn't seem to load the extension.

 

Has anyone gotten any custom made extensions to work on the Playbook through webworks?....  

 

I need to access some of the native functionality through an extension that I can use through javascript.  Is there any blackberry developers that can look into this?

 

Mark

New Developer
Posts: 7
Registered: ‎04-09-2012
My Device: Playbook
My Carrier: Koodo

Re: Java Extensions...

Hmm..

 

Ok.. At least at the end of the documentation on the link about the AIR extensions.. It has a line..

 

<action system="true">run_air_native</action>

 

That needs to be added to the blackberry-tablet.xml to make those extensions work.   So now at least I was able to get the Sleep air extension to run.   So at least the door has been cracked open...  Now more figuring out to do.

 

BTW: Blackberry.. Please get someone ontop of your documentation, its starting to become dated and out of sync.  Keep on top of it, because it would save new developers on your platform days of frustration on what should be simple to do.

 

Mark