Topic
  • 7 replies
  • Latest Post - ‏2011-02-27T21:46:25Z by Tcheky.Stiles
GPeretti
GPeretti
2 Posts

Pinned topic Implementing "Build a mobile RSS reader" tutorial

‏2010-02-19T18:29:48Z |
I'm trying to implement the tutorial, but I'm getting Java errors that I'm hoping to receive guidance on. If this is the wrong place to ask, please point me in the right direction.

I've followed the steps of the tutorial (using Eclipse) and am getting several errors. I'm a noob at Java (trying to learn is an uphill battle I intend to win).

The main ones are in the RSSReader.java

Specifically getting "The method add(int) in the type Menu is not applicable for the arguments (int, int, String)" error and "Menu.Item cannot be resolved to a type".

Thanks for any help.
Updated on 2011-02-27T21:46:25Z at 2011-02-27T21:46:25Z by Tcheky.Stiles
  • SystemAdmin
    SystemAdmin
    17 Posts

    Re: Implementing "Build a mobile RSS reader" tutorial

    ‏2010-03-08T18:55:09Z  
    Did you ever figure this out?

    I'm having the same problem. Guessing I'm doing something stupid or missing something easy since I'm new to Android and Java.
  • GPeretti
    GPeretti
    2 Posts

    Re: Implementing "Build a mobile RSS reader" tutorial

    ‏2010-03-08T20:25:51Z  
    Did you ever figure this out?

    I'm having the same problem. Guessing I'm doing something stupid or missing something easy since I'm new to Android and Java.
    No, I haven't yet. I guess this board is dead or my question was too inane to be answered by those more knowledgeable.
  • MistaJase
    MistaJase
    1 Post

    Re: Implementing "Build a mobile RSS reader" tutorial

    ‏2010-04-01T18:43:56Z  
    I got it working!

    took a bit of messing around but I managed to do it!

    Check the attached file
  • Capt.Awesome
    Capt.Awesome
    1 Post

    Re: Implementing "Build a mobile RSS reader" tutorial

    ‏2010-05-05T11:11:10Z  
    • MistaJase
    • ‏2010-04-01T18:43:56Z
    I got it working!

    took a bit of messing around but I managed to do it!

    Check the attached file
    public void onItemClick(AdapterView parent, View v, int position, long id) {
    Log.i(tag, "item clicked! ");

    Intent itemintent = new Intent("com.locallite.app.ShowDescription");

    Bundle b = new Bundle();
    b.putString("title", feed.getItem(position).getTitle());
    b.putString("description", feed.getItem(position).getDescription());
    b.putString("link", feed.getItem(position).getLink());
    b.putString("pubdate", feed.getItem(position).getPubDate());

    itemintent.putExtra("android.intent.extra.INTENT", b);
    startActivity(itemintent);

    }

    startActivity(itemintent) is seem to be crashing the application. Let me know if you found out a solution for it.

    Thanks for the menus they are working fine now.
  • YoursTruely
    YoursTruely
    1 Post

    Re: Implementing "Build a mobile RSS reader" tutorial

    ‏2010-05-24T05:12:37Z  
    • MistaJase
    • ‏2010-04-01T18:43:56Z
    I got it working!

    took a bit of messing around but I managed to do it!

    Check the attached file
    I'm confused as to how this

    Log.i(tag,"Refreshing RSS Feed");
    refreshes my feed...

    Android seems to not know how that is supposed to refresh my feed either..
  • cybergen
    cybergen
    1 Post

    Re: Implementing "Build a mobile RSS reader" tutorial

    ‏2010-08-04T22:24:03Z  
    I'm confused as to how this

    Log.i(tag,"Refreshing RSS Feed");
    refreshes my feed...

    Android seems to not know how that is supposed to refresh my feed either..
    That updated code works well, but it seems that in the newer Android revisions, you need to explicitly declare your intent to access the internet. Otherwise, the code will always fail to openStream() on the URL provided. You can get internet permission by adding the following to your manifest file:

    <uses-permission android:name="android.permission.INTERNET" />
  • Tcheky.Stiles
    Tcheky.Stiles
    1 Post

    Re: Implementing "Build a mobile RSS reader" tutorial

    ‏2011-02-27T21:46:25Z  
    TGamer wrote:
    Did you ever figure this out?

    I'm having the same problem. Guessing I'm doing something stupid or missing something easy since I'm new to Android and Java.

    It's quite useful, Thanks for your explanation!