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

Adobe AIR Development

Reply
Developer
Posts: 1,269
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: Adding RSS functionality

One more thing:  I'm new to AS3 and still not 100% clear on details of garbage collection but in at least the incarnation of FullRSSReader.as that I downloaded, I was concerned that it might leak memory since it allocates new variables in event handlers and I wasn't sure if/how that memory was getting released as the user interacted with the program and navigated from screen to screen.  If you are reusing that example code, you probably want to review your code for memory leaks, and if you have the paid or trial full version of FB/Burrito you might want to use the memory profiler and see if your memory usage levels out or grows without bound as you interact with your RSS feed functions.

Developer
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)
My Carrier: Rogers

Re: Adding RSS functionality

Just curious, is it possible to grab just the text from an rss feed? Right now I'm loading the whole webpage but like you said it may lead to memory leaks (and I'm including practically a whole web browser which is a little overkill). Just figure if I can get just the text it might be a little more reasonable.
- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Adding RSS functionality

hey jffurian,

 

if your rss feed is in XML format (most are) you can parse the XML with actionscript code. it will be a lot more reliable than retreieving an entire page.

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Posts: 1,269
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: Adding RSS functionality

[ Edited ]

 


jffurlan wrote:
Just curious, is it possible to grab just the text from an rss feed? Right now I'm loading the whole webpage but like you said it may lead to memory leaks (and I'm including practically a whole web browser which is a little overkill). Just figure if I can get just the text it might be a little more reasonable.

 

I'm not quite clear on the question - are you wanting to grab other parts of the XML tree from the RSS feed and display those in your UI?  Or, are you wanting to grab some content text out of the HTML returned from e.g. an Engadget story and present that in your own UI controls so that you don't have to mess with a QNXStageWebView?  If it's the latter then you'll have to analyze the HTML structure of each site's articles to extract the content text.  And I'm not sure if re-presenting the content in that manner would violate a site's terms.  For something a client shows a user from Engadget, whether it's a rendered web page or just article text, probably Engadget wants you to make sure that the user knows it's an Engadget story.

 

Maybe you are wanting to present mobile device friendly layouts of the story contents instead of the desktop view?  Many sites are set up now to render differently based on whether you are viewing them in a desktop browser vs. a mobile device but I'm not up to speed on how the responsibility for pulling this off is split up between the client HTTP request header letting the server know what kind of browser is making the request, vs. the server pushing multiple layout formats in a stylesheet and letting the client pick the best one.  

 

Regarding memory leaks, that comment wasn't prompted by what kind of content you're loading or how much, rather I was just not clear on how the objects allocated in the event handler functions in FullRSSReader get cleanly garbage collected.  Still reading articles here & there on AS3 GC.

 

Edit:  Re-reading your last post and JRab's reply ... maybe just grabbing the text out of the <description> RSS node under the <item> node gets you done?

 

http://www.rssboard.org/rss-specification#hrelementsOfLtitemgt

Developer
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)
My Carrier: Rogers

Re: Adding RSS functionality

[ Edited ]

Wow, you guys are awesome! That's pretty much exactly what I was looking for. I'd rather not load the whole webpage as it kind of opens up my app to more functionality then I was intending (not bad, but...). Now just to figure out how to display the text.

 

EDIT Just so no one thinks I'm looking for someone to write my code for me I am playing around with it on my end lol!

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Developer
Posts: 1,269
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: Adding RSS functionality


jffurlan wrote:

 

EDIT Just so no one thinks I'm looking for someone to write my code for me I am playing around with it on my end lol!


No worries; I think we can tell that you're not a script kiddie.  Smiley Wink

Developer
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)
My Carrier: Rogers

Re: Adding RSS functionality

lol, I don't even know what that means.

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Adding RSS functionality

@jffurian: its a good thing hah. a script kiddie is somoene who copies and pastes other peoples code and running it without prior knowledge as to what the code really does. we've seen you work hard so no worries Smiley Happy

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Visitor
Posts: 1
Registered: ‎02-13-2011
My Device: Torch
My Carrier: Airtel

Re: Adding RSS functionality

i need a small favour from your guys

i am having a website www.techblogpro.com, its having rss feeds, i just want to create an rss feed app just like time app for blackberry, anyone please help me , i am a noob here

Regards,
Aditya Bhimrajka
CEO, Sy-Tech Group
Highlighted
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Adding RSS functionality

@sytechindia:  What exeactly are you asking?  How to write an RSS app, how to modify the OS RSS app for PB?  Have you installed QNX library, and simulator and tried out the Hello World app?

 

RSS app on PB is not mucn different than a RSS app on a desktop.  So if you have one of those, are you asking how to port or rewrite it on the PB?