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
Developer
Developer
Posts: 137
Registered: ‎06-01-2009
My Device: Not Specified
Accepted Solution

Widget -- HTTP connection to a site

I am building a widget using Visual Studio 2008 plug-in on Window 7. The widget access RSS feed located on external server.

 

I assume I have to add the URL to the config file.  I see a section called Widget Permissions in Config.xml.

 

I click on Add Domain then type the Domain. However when I click on save icon, the file is not saved. Then When I try to close the file, I get popup asking whether I need to save the file, I say yes.

 

Then when I re-open the file, the URL that I have just added is not there, the changes are not saved.!!

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

Re: Widget -- HTTP connection to a site

Are you using Windows 7 32 or 64 bit?

 

We don't have "official" support for Windows 7 with our tooling yet.  So there are different problems that you will run into.  More so on 64 than on 32.

 

Have you launched Visual Studio with "Run as Administrator"?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Developer
Posts: 137
Registered: ‎06-01-2009
My Device: Not Specified

Re: Widget -- HTTP connection to a site

I am using Windows 7 32 bit and Visual Studio 2008.

 

I do not think the issue related to Windows 7. I am able to modify and save all files, such as JavaScript, html,...etc. except config.xml

 

Do you know whether as work around open config.xml in notepad and Add the section for domain. If yes, then Can you tell me how?

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

Re: Widget -- HTTP connection to a site

You can browse to the directory via File Explorer and open the config.xml file in notepad and make your changes.  That should work.  As far as the XML mark-up format, you can check out the widget Developer's guide found here:

http://docs.blackberry.com/en/developers/subcategories/?userType=21&category=BlackBerry+Widgets&subC...

 

I'll also check with the Development Team to see if they have any ideas or workarounds in the tooling.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Developer
Posts: 137
Registered: ‎06-01-2009
My Device: Not Specified

Re: Widget -- HTTP connection to a site

I ran Visual Studio as admin, still the sam issue not able to save config.xml.

 

So I opened config.xml in notepad and modified and added access to external web sites. Please see below.

 

I ran MDS simulator, the same one used for Java Development (Tested before and works fine).Then run my widget from Visual Studio,however the widget is not able to make http connection.

 

The widget (JavaScript logic) was tested on other platforms and worked fine.

 

Is something wrong with config.xml ?

 

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns:rim="http://www.blackberry.com/ns/widgets" version="0.0.5" rim:header="RIM-Widget:rim/widget" xmlns="http://www.w3.org/ns/widgets">
  <name>NHL Gamecentre</name>
  <description >NHL Info</description>
  <author href="" rim:copyright="" email="" />
  <icon src="icon.png" />
  <feature id="blackberry.invoke"/>
  <id>Test</id>
  <access uri ="*"/>
  <content src="index.htm" />
  <rim:loadingScreen backgroundColor="000000" />
  <rim:connection timeout="30000">
    <id>MDS</id>
    <id>WAP2</id>
    <id>BIS-B</id>
    <id>TCP_WIFI</id>
    <id>TCP_CELLULAR</id>
    <id>WAP</id>
  </rim:connection>
  <license href="" />
</widget>

 

Developer
Developer
Posts: 137
Registered: ‎06-01-2009
My Device: Not Specified

Re: Widget -- HTTP connection to a site

I've discovered the connection will not work if there is a proxy. Even though I have the proxy setting in rimpublic.property and it worked fine with BB plug-in for Eclipse for Java Development.

 

However running the same MDS simulator, HTTP connection from the widget did not work. Is it an issue with BB plug-in for Visual Studio ? not sure.