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: 30
Registered: ‎10-16-2009
My Device: Not Specified

Reading News Feeds

Hi

 

There

 

I 've made a bb widget to read google news RSS Feed. I 'm facing two problems

 

 .1. Images in the feeds are not getting displayed in bb emulator while the same is working with IE and Firefox

 2. In case i 've made a link to an item that is located on different server (as rss feed can contain links to different servers) then in this case can i dynamically edit my config.xml so as to add more urls to access element in config.xml

Kleward Consulting Pvt Ltd
Exceptional People : Exceptional Talent
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Reading News Feeds

[ Edited ]

If you want content from any domain to be able to be brought into your widget you can use the following in the config.xml

 

 

<access uri="*" />

 

 

This will allow any content to be drawn in from any domain.  However, you will not be able to nest any of the <feature> elements in this white listed item.

 

Make sure you are using the BlackBerry Widget SDK Beta 2.  It has this added functionality.

 

Hopefully that helps.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Developer
Posts: 30
Registered: ‎10-16-2009
My Device: Not Specified

Re: Reading News Feeds

Thanks

 

I agree that I can use the <access uri="*" > in config.xml for accessing any url from bbwidget. But In this case i can't add feature element inside access element.

 

I 'm adding feature elment inside the access tag because My server side php script leaverages the capabilit<y of bbwidgets. It checks whether user is leaving the widget.

<access uri......>

<feature id="blackberry.app">

.

.

</access>

 

Kleward Consulting Pvt Ltd
Exceptional People : Exceptional Talent
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Reading News Feeds

Unfortunately there is no way to dynamically change your widget's config.xml file on the fly.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 168
Registered: ‎11-01-2008
My Device: Galaxy S II
My Carrier: Meteor (Ireland)

Re: Reading News Feeds

Just add the wildcard access element so that your widget can have access to static content from anywhere, and add a specific access element with a nested feature element for any site from which you are loading script that will use the feature in question. In other words, having a wildcard access element doesn't preclude you from also have specific access elements. As I understand it.

New Developer
Posts: 30
Registered: ‎10-16-2009
My Device: Not Specified

Re: Reading News Feeds

Thanks

 

Probably this solution will do.

Kleward Consulting Pvt Ltd
Exceptional People : Exceptional Talent
Developer
Posts: 168
Registered: ‎11-01-2008
My Device: Galaxy S II
My Carrier: Meteor (Ireland)

Re: Reading News Feeds

Cool. Make sure you mark the relevant post as the solution in that case.

New Developer
Posts: 13
Registered: ‎12-03-2009
My Device: Not Specified

Re: Reading News Feeds

Hi I am trying to read the RSS feeds too using Blackberry widgets but I am not able to get the XML code of the RSS feeds page. I am right now just opening the RSS feeds page through a URL. But I would like to get the location and date from the RSS feeds for which I need to get the XML code. I tried using XMLHTTPRequest but that is giving me an error. No idea why. Can you please help me asap this is very urgent as I have a submission today. Please reply asap. Thanks in advance

New Developer
Posts: 30
Registered: ‎10-16-2009
My Device: Not Specified

Re: Reading News Feeds

Hi

There

 

 

Post your code here.

 

And also tell us which server or client side tech you are using to parse xml response

Kleward Consulting Pvt Ltd
Exceptional People : Exceptional Talent
New Developer
Posts: 13
Registered: ‎12-03-2009
My Device: Not Specified

Re: Reading News Feeds

I could solve the problem of getting RSS feeds in XML format and also displaying it to the user. I want to add more features to my application apart from just fetching the feeds. can you suggest some features I can add? I have a project submission today, can you please help me asap

 

I thought of storing the RSS feeds in the SD card so that the user can read it when he is offline too.

I have taken the code from

 

http://na.blackberry.com/eng/developers/devbetasoftware/widgetsdk.jsp

 

and used the exact same thing. I am getting errors in my js file saying the functions blackberry.io.file.exists(filePath), blackberry.io.file.readFile(filePath, readFile), blackberry.io.file.deleteFile(filePath), blackberry.io.file.saveFile(filePath, blob) are unresolved.

 

But my program is getting compiled correctly and the simulator is up and running. When I open the application and click on the open file item in the menu item I see this error on my eclipse console :

 

net.rim.device.api.io.file.FileIOException: File system error (1003)
    Running  at line    5: if(blackberry.io.file.exists(filePath) ){.

 

Any idea why I am seeing this error?

 

Thanks in advance