我是Android新手,我正在尝试为Android构建RSS阅读器.我已经构建了所有类和XML文件,但它没有提供所需的输出.它只是显示消息
No RSS feed available.
请有人建议我该怎么做.
这是我从教程中获取的代码,并试图操纵 -
public final String RSSFEEDOFCHOICE = "http://blog.01synergy.com/feed/";
public final String tag = "RSSReader";
private RSSFeed feed = null;
/** Called when the activity is first created. */
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
// go get our feed!
feed = getFeed(RSSFEEDOFCHOICE);
// display UI
UpdateDisplay();
}
private RSSFeed getFeed(String urlToRssFeed)
{
try
{
// setup the url
URL url = new URL(urlToRssFeed);
// create the factory
SAXParserFactory factory = SAXParserFactory.newInstance();
// …Run Code Online (Sandbox Code Playgroud)