1. Download our Official Android App: Forums for Android!

Apps Passing data with Intents

Discussion in 'Android Development' started by __Jon__, Oct 5, 2010.

  1. __Jon__

    __Jon__ Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    15
    Joined:
    Aug 16, 2010

    Aug 16, 2010
    15
    0
    15
    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 Android Expert
    Rank:
    None
    Points:
    128
    Posts:
    1,446
    Joined:
    Sep 28, 2009

    bundle.getInt("SomeIntData");
     

Share This Page

Loading...