ありがとうございました。今、私はthirdActivityからfirstActivityに値を渡すことができます。これは私のやり方です。
ThirdActivity:
public class ThirdActivity extends Activity {
double value1, value2;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
value1 = Double.parseDouble(value1FromSecondActivity);
value2 = Double.parseDouble(value2FromSecondActivity);
Intent intent = new Intent(this, FirstActivity.class);
intent.putExtra("Value1", value1);
intent.putExtra("Value2", value2);
startActivity(intent);
finish();
}
}
FirstActivity:
public class FirstActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
}
@Override
protected void onResume() {
Bundle extras = getIntent().getExtras();
if (extras != null) {
dValue1 = extras.getDouble("Value1");
dValue2 = extras.getDouble("Value2");
Toast.makeText(getBaseContext(), dValue1 + " : " + dValue2, Toast.LENGTH_SHORT).show();
}
else {
Toast.makeText(getBaseContext(), "Null", Toast.LENGTH_SHORT).show();
}
super.onResume();
}
}
は、編集をいただき、ありがとうございます。 – Zephyr