title: How to determine if a phonegap android activity is already running
body: <p>I have an android nfc reading application developed using phonegap. The application detects which mimetype was scaned and launches the app with the relevant file loaded.</p>
  
  <pre><code>if(receivedType.endsWith("/one")){
      super.loadUrl("file:///android_asset/www/index.html"); 
  }else if(receivedType.endsWith("/two")){
     super.loadUrl("file:///android_asset/www/other/index.html"); 
  }
  </code></pre>
  
  <p>The problem is that on the first time of detecting mimetype "one" the app launches as desired, scan another tag with the same mimetype "one" then the app attempts to relaunch and crashes. I would like to detect if the app is already running and prevent the relaunch attempt.</p>