Can I update data members in one Activity from another Activity in the application?
<p>I've tried this and it works, but I didn't know if this was a bad thing or not, as all the help on data transfers between Activities seems to use intents.</p>

<p>In MainActivity I have:</p>

<pre><code>static PilotRecord pilotRecord = new PilotRecord(); //PilotRecord just contains data item declarations
</code></pre>

<p>In MainActivity.onCreate:</p>

<pre><code>pilotRecord.fuel = 100;
</code></pre>

<p>In MainActivity.onClick:</p>

<pre><code>Intent intent = new Intent(this, SubActivity.class);
startActivityForResult(intent, 0);
</code></pre>

<p>In SubActivity.onCreate I have:</p>

<pre><code>MainActivity.pilotRecord.fuel = 200;
</code></pre>

<p>In SubActivity.onClick:</p>

<pre><code>MainActivity.pilotRecord.fuel = 300;
setResult(RESULT_OK);
finish();
</code></pre>

<p>When I start MainActivity, the fuel value is 100</p>

<p>If I click in MainActivity, SubActivity is displayed, as expected</p>

<p>If I click in SubActivity, MainActivity is displayed and the fuel value is now 300</p>

<p>If I press the Back button, MainActivity is displayed and the fuel value is now 200</p>

<p>Does anyone know of any potential issues with this as it seems simpler to me than setting up intents etc.</p>

<ul>
<li>Frink</li>
</ul>
