Passing data with Intents


Last Updated:

  1. __Jon__

    __Jon__ Member This Topic's Starter

    Joined:
    Aug 16, 2010
    Messages:
    15
    Likes Received:
    0
    I'm trying to pass data with my intent. I wan to pass a topscore number (int) from one activity to another.
    I'm pretty sure I did it:
    Code (Text):
    1. Intent keepscore = new Intent(this, Finished.class);
    2.     keepscore.putExtra("SomeIntData", tally);
    3.         startActivity(keepscore);
    The Finished activity loads as I wanted, but I want to retrieve this int data, "tally". I don't know how to do it.
     

    Advertisement
  2. mrqs

    mrqs Well-Known Member

    Joined:
    Sep 28, 2009
    Messages:
    1,446
    Likes Received:
    92
    bundle.getInt("SomeIntData");
     

Share This Page

Loading...