Java/Android: Passing Intent Extras, then use it on another method
<p>Hello again everyone,<br>
This time I have a problem with Intent &amp; Extras.</p>

<p>here's my first activity</p>

<pre><code>Intent i1 = new Intent(RoomSetting.this, App.class);
i1.putExtra("subposition1", "right");
final int result=1;
startActivityForResult(i1, result);
</code></pre>

<p>and in the 2nd activity I try to get "subposition1" value</p>

<pre><code>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");
}
</code></pre>

<p>My question is, how can I use SubPos on another method?</p>

<p>Sorry for noobish question. Thanks in advance</p>
