title: android: how to know whether app was called by another app
body: <p>I managed to register my app as camera app via</p>
  
  <pre><code>&lt;activity android:name=".CameraActivity" android:clearTaskOnLaunch="true"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="android.media.action.IMAGE_CAPTURE" /&gt;
          &lt;category android:name="android.intent.category.DEFAULT" /&gt;
      &lt;/intent-filter&gt;
  &lt;/activity&gt;
  </code></pre>
  
  <p>Now, I would like to know whether my app was startet as intent or directly by the user, so I can react accordingly:</p>
  
  <ul>
  <li>returning an image via setResult (in case of returning to the previous app)</li>
  <li>saving the image to disk (in those cases where no previous app is involved)</li>
  </ul>
  
  <p>Anyone knows how to get this information?</p>