title: Can I exit my android app with code when it is started from a deeplink?
body: <p>I am building an app which uses either some activities in which the user can navigate or uses one specific activity which starts the app when a deeplink is used. In this DeeplinkActivity I have a button with which the app should exit the entire app and not put it into the background.
  I tried the following code, which only closes the app, but it still remains in the background?!</p>
  
  <pre><code>public void onStopButton(View view) {
      log.info("UI -&gt; Stop this app");
      // this.finishAffinity();
      android.os.Process.killProcess(android.os.Process.myPid());
      // finish();
      System.exit(0);
  }
  </code></pre>
  
  <p>I tried all kinds of suggested combinations, but none of them really exits the app. Anybody have some other (working) code suggestions?
  I have set minSdkVersion=19 and targetSdkVersion=26</p>