Voice
2 つの異なるバンドルを 2 つの異なるアクティビティに発射するアクティビティがあります。
Bundle a = new Bundle();
a.putInt("key", counter_score);
Intent sendtoA = new Intent(Voice.this, ActivityA.class);
sendtoA.putExtras(a);
startActivity(sendtoA);
String correct_a = txView.getText().toString();
Bundle basket_a = new Bundle();
basket_a.putString("keya", correct_a);
Intent putBasket_a = new Intent(Voice.this, ActivityFinal.class);
putBasket_a.putExtras(basket_a);
finish();
私は両方でバンドルa
をうまくキャッチしますActivityA
ActivityFinal
Bundle got_a = getIntent().getExtras();
gota = got_a.getInt("key");
ただし、basket_a を取得できません
Bundle gotA = getIntent().getExtras();
gotLetterA = gotA.getString("keya");
txView.setText("Nice" + gotLetterA);
1 つのバンドルが渡され、もう 1 つのバンドルが文字列を渡しています。
ActivityFinal の gotA の場合、結果は null を示します。
thnx