RSS podcast feed on android

You must Login before you can answer or comment on any questions.

I have a working rss podcast feed on iPhone that when run in Android emulator crashes. It worked up to when the items are displayed in a tableview but when item is clicked, the app crashes and restarts with nothing else. I am thinking I need to code-branch on what needs to happen if OS is android. But I don't know where to do the branching or how to the branching, or worse still what to branch to. I hope it is possible to access RSS feed of podcasts in android.

Please help point me in the right direction; this app is almost complete if only this function will also work on android. I looked at a similar task (CNN radio news) in Kitchen sink but noticed it was only for iOS; nothing on android.

— asked 2 years ago by adebisi oladipupo
1 Comment
  • Thx for the tut on cross-platform dev. However, what you advise is exactly what I have done. My problem is that I have RSS podcast feed that automatically invokes the quicktime player on clicking the embedded link in the title. I didn't have to code a player for the streaming of the media.

    I suspect this is why this is crashing in android; no player to play the media or is there and can auto play like it does in iOS? I will appreciate a pointer as to how to make my RSS podcast play in android as well. I thought of putting a code that calls a media player if OS is android (hence the branching suggestion) but not sure how to make the player reference the embedded link in the RSS feed.

    I am confident the talent in this community will show me a solution. thx and happy holidays y'all.

    — commented 2 years ago by adebisi oladipupo

1 Answer

Accepted Answer

Hi

The problem you have may not be iOS/Android specific so my suggestion is find the actual issue before doing anything else. You can do this effectively in this sort of issue by using liberal amounts of Ti.API.info, I would place one on every other lines of code in the affective part. When you run the app the console will show how far you get through. That becomes you debugging starting point.

Example;

Ti.API.info('feed issue', 1);
var x= y;
Ti.API.info('feed issue', 2);
var p = 89;
Ti.API.info('feed issue', 3);
...
If you really want to use branching - after you have solved your problem, then it is much easier than you may have thought. But you should plan things as branching can actually lead to just creating two versions and that is not the smart move. You should ONLY split things when they are actually different in presentation or reaction to events or external factors.

If you are not already then you should investigate CommonJS.

By creating your code in re-usable module patterns you focus on the end result rather than the UI/UX. So you can have that in specific CommonJS modules - you just place them in their respective folders.

Standard way - Imagine you are creating a UI module you may have a folder layout like and place it inside the most logical place;

/android/
/iphone/
/assets/
/ui/newmodule.js
You would then reference this in your code as;
var NM = require('/ui/newmodule');
In branching you simply create two versions, place specific code into the distinct versions to handle the problem as best for THAT device.

/android/ui/newmodule.js //the android specific version
/iphone/ui/newmodule.js //the ios specific version
/assets/
/ui/ // nothing related here
You STILL reference this in your code as;
var NM = require('/ui/newmodule');
Just now it checks the Android folder for the android specific version and if running on iOS it looks in the iPhone folder.

If you are only talking a couple of minor differences then simply use if statements on Ti.Platform properties.

— answered 2 years ago by Malcolm Hollingsworth
answer permalink
17 Comments
  • Hi

    Can I ask if the working iOS rss podcast solution uses a webview to achieve the player? If yes then it is likely that is the reason.

    Can you supply some code you have used that we can use to reproduce your exact situation and the rss feed (or snippet) so we can re-produce?

    As you had not supplied any code previously I was left to guess your issue - which in general would have solved it, but in your specific case - not yet.

    If you can supply more information I can try and supply more (or initial) help :)

    — commented 2 years ago by Malcolm Hollingsworth

  • Thx for the tut on cross-platform dev. However, what you advise is exactly what I have done. My problem is that I have RSS podcast feed that automatically invokes the quicktime player on clicking the embedded link in the title. I didn't have to code a player for the streaming of the media. I suspect this is why this is crashing in android; no player to play the media or is there and can auto play like it does in iOS? I will appreciate a pointer as to how to make my RSS podcast play in android as well. I thought of putting a code that calls a media player if OS is android (hence the branching suggestion) but not sure how to make the player reference the embedded link in the RSS feed. I am confident the talent in this community will show me a solution. thx and happy holidays y'all.

    — commented 2 years ago by adebisi oladipupo

  • Hi, I did see the comment you made earlier to your question - which is why I followed up with another comment to my question an hour ago. Do you have any code as my further comment asked?

    — commented 2 years ago by Malcolm Hollingsworth

  • Show 14 more comments

Your Answer

Think you can help? Login to answer this question!