This code starts the activity:
Intent intent = new Intent(context, GameActivity.class); intent.putExtra(\"load\", true); startActivity(intent);
private Intent intent = this.getIntent();
Call getIntent() inside onCreate or in another callback of the life cycle.
getIntent()
onCreate
Try out as below:
private boolean value =getIntent().getBoolean("load");