Hello again everyone,
This time I have a problem with Intent & Extras.
here’s my first activity
Intent i1 = new Intent(RoomSetting.this, App.class);
i1.putExtra("subposition1", "right");
final int result=1;
startActivityForResult(i1, result);
and in the 2nd activity I try to get “subposition1” value
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
mAccVals = new Number3d();
Bundle extras = getIntent().getExtras();
String SubPos = extras.getString("subposition1");
}
My question is, how can I use SubPos on another method?
Sorry for noobish question. Thanks in advance
Just call this on your “other method”.