1. Check out our app, Forums for Android! Download and leave feedback here!

Passing data with Intents

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

  1. __Jon__

    __Jon__ Member
    Thread Starter
    15

    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. bundle.getInt("SomeIntData");
     

Share This Page

Loading...