Intent myIntent = new Intent(Main.this, Selected.class);
Main.this.startActivity (myIntent);myIntent.putExtra ("NAME", "yes");
, когда я хочу получить "yes" в моем другом классе, это не работает:
test = (TextView)findViewById(R.id.test);
String myIntentString = icicle !=null? icicle.getString("NAME"):null;
if(myIntentString==null){
Bundle extras = getIntent().getExtras();
myIntentString = extras != null ? extras.getString("NAME") : "nothing passed in";
}
test.setText(myIntentString);