title: How do I close out of Google Navigation programmatically?
body: <p>I am starting Google Navigation through an Intent:</p>
  
  <pre><code>private static final int  GOOGLE_NAV = 5;
  
  Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
              Uri.parse("google.navigation:q= some + address"));
  startActivityForResult(intent,GOOGLE_NAV);
  </code></pre>
  
  <p>I then check if the user has reached his destination via a LocationListener. If the user has arrived, I want to close the Google Navigation activity.</p>
  
  <pre><code>if(hasArrived())
  {
      finishActivity(GOOGLE_NAV);
  }
  </code></pre>
  
  <p>However, my code doesn't seem to work.</p>