Hi guys I am trying to pass a string to another activity but when I use getIntent() the intent does not have the data.
Intent intent = new Intent(Game.this, scoreScreen.class);
Game.this.startActivity(intent);
int example = game.getScore();
String se = Integer.toString(example);
intent.putExtra("1",se);
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_score_screen);
Intent ints = getIntent();
TextView vi = (TextView) findViewById(R.id.score);
Bundle se = ints.getExtras();
String send = se.getString("1");
vi.setText(send);
}
se.getString returns null.