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

Web and WebWorks Development

Reply
Contributor
bgill822
Posts: 17
Registered: ‎03-23-2012
My Carrier: T-Mobile

Re: Unable to refrence the blackberry.app API

ok I got it to work by creating a virtual directory I have not looked at links you just sent but wanted to let you know that I can now hook into blackberry.app API from index.html.

 

So the reason I am venturing into Blackberry APP developement is that I am working on a POC to compare RFID on Intermec vs QR Codes on Blackberry I am now following this article here

 

https://github.com/blackberry/WebWorks-Community-APIs/tree/master/Smartphone/Barcode

 

Is this article up to date and do you know if this works as stated?

 

Thanks

Bikram

 

Please use plain text.
Contributor
bgill822
Posts: 17
Registered: ‎03-23-2012
My Carrier: T-Mobile

Re: Unable to refrence the blackberry.app API

I am perplexed the following code works in the Ripple Emulator even with no config.xml

 

var s = blackberry.app.version 

alert(s);

 

but this code doesn't because it cannot find message object (it says message undefined)

 

 var message = blackberry.message.Message();
message.toRecipients = "bikram.gill@paccar.com";
message.subject = "Hello";
message.body = "World";
/message.send();

 

 

 

 

Please use plain text.
Contributor
bgill822
Posts: 17
Registered: ‎03-23-2012
My Carrier: T-Mobile

Re: Unable to refrence the blackberry.app API

With the stand alone Ripple all I get is a blank screen when I load it.

Please use plain text.
Contributor
bgill822
Posts: 17
Registered: ‎03-23-2012
My Carrier: T-Mobile

Re: Unable to refrence the blackberry.app API

I got the sample app using blackberry.app to work using Ripple but when I test it on my blackberry by browsing to the site I get blackberry.app undefined error message. I don't believe I have to package a web app.

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 537
Registered: ‎07-15-2008
My Carrier: Bell

Re: Unable to refrence the blackberry.app API

I'm not sure why the api works without a config file, but that would likely be a bug in Ripple. You should have to include a feature in the config.xml file in order for a WebWorks API to be available.

 

Yes, you absolutely must package a WebWorks application in order to access the WebWorks APIs on a real device. WebWorks APIs are built into the application during the packaging process and are not available in the regular browser. WebWorks is a way to develop Full Applications for the platform using Web technology - it's not for building mobile Websites.

Tim Windsor
Application Development Consultant
Please use plain text.
Contributor
bgill822
Posts: 17
Registered: ‎03-23-2012
My Carrier: T-Mobile

Re: Unable to refrence the blackberry.app API

But I should be able to call a web service from with the the application though right?

Any ideas why the message feature is not working I get message object undefined.

Also when I open the standalone Ripple all i get is a blank screen.

 

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 537
Registered: ‎07-15-2008
My Carrier: Bell

Re: Unable to refrence the blackberry.app API

You should be able to call web services.

 

Make sure you are running Ripple with the correct Platform selected. It needs to be WebWorks and not WebWorks-TabletOS or anything else to get blackberry.message.

Tim Windsor
Application Development Consultant
Please use plain text.