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
kknuth
Posts: 19
Registered: ‎10-08-2008
My Device: Not Specified
Accepted Solution

Widgets and non-public web servers

I have read through the new widget documentation at a high level and I have one lingering question.  All the doc seems to assume that your app/widget is interfacing with a fixed know URL.  For example, you have a public website called mybowlingleagues.com and your ap/widget is a mini-version of that site with some cool integration with the Blackberry GPS.  Ok, fine.

But how about when the app/widget you deliver needs to interface with an unknown URL at your customer's business?  One customer's web server may be www.mybusinessA.com and another www.mybusinessB.com, etc.  You get the picture.

How can the user enter their webserver to interact with when they are installing the app or the first time they run the app, then have the app store that URL and interact with the URL from then on?

 

Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Widgets and non-public web servers

For security reasons, the JavaScript inside the widget can't change what locations or API's it is allowed to access... If this type of functionality were made available it could make it possible that some rouge script could open up full API access to the device to an arbitrary URL and then pump down data from your device.  Obviously not a good scenario :smileyhappy:

 

The white list follows the same origin policy when allowing access.. So you can make it domain specific by doing something like

<access uri="http://mydomain.com" subdomains="true" />

 

If you are looking at a corporate installation where the data you are accessing is internal to the company behind their BES, you can create your own application's standard domain name such as "http://www.myappdomain.com" and then add the domain name to the company's DNS servers and/or to the configuration files of the BES.

 

The ability to open up access to "any" domain into your widget should be in a follow up Beta where we have also added the structure around how to properly secure these scenarios.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Developer
kknuth
Posts: 19
Registered: ‎10-08-2008
My Device: Not Specified

Re: Widgets and non-public web servers

I will have to wait for the "follow up Beta" then.  Our customers can install the web app on any web server in their company on their own domain, so we need to be ablve to let the user configure the widget to their specific web server.

 

Thanks for the answer!