In StartActivityForResult how to get requestCode from child
<p><br>
I have Four activity say A, B, C and D<br>
My situation is A will start the activity B by startActivityForResult.  </p>

<pre><code>startActivityForResult(new Intent(this,B.class),ONE);
</code></pre>

<p>In other situation i will B with other situation. like </p>

<pre><code> startActivityForResult(new Intent(this,B.class),TWO);
</code></pre>

<p>In B i need to check I need to call C or D depending requestCode. I.e if ONE need to start C else D
So i need to know who to check the requestCode in the child Activity (B here )<br>
Or in other words I want to get with what request code did B started in the Activity B<br>
Thanks in advance </p>
