title: Phonegap handling push notification in the background
body: <p>We're using <a href="https://github.com/phonegap/phonegap-plugin-push" rel="nofollow">phonegap push plugin</a> to send interactive push notifications (with buttons). <a href="https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#background-notifications" rel="nofollow">Documentation</a> suggests using "content-available" in the payload for background notifications.</p>
  
  <p>However, even with content-available value set; when user clicks on the push notification button the plugin loads the application and shows the login page. Below is a sample push notification payload.</p>
  
  <pre><code>{
  "data" : {
      "title":"Test title", 
      "message":"Test message", 
      "content-available": "1",
      "actions": [{ icon: "", title: "APPROVE", callback: "approve"},
           { icon: "",title: "DENY", callback: "deny"}
          ]
      }
  }
  </code></pre>
  
  <p>Callback functions (approve, deny in the above sample) are fired and push action buttons are handled appropriately.</p>
  
  <p>My question is:</p>
  
  <p>How can the app handle push notification action buttons in the background WITHOUT loading the app and showing the login screen?</p>
  
  <p>Are there any other push plugins that can handle this scenario?</p>
  
  <p>Desired workflow:</p>
  
  <ol>
  <li>The app may or may not be running in the background, the phone may or may not be locked (requiring passcode if locked)</li>
  <li>User receives a push notification with approve/deny buttons.</li>
  <li>User swipes (down in Android, left in ios) and reveals the buttons.</li>
  <li>User clicks on a button</li>
  <li>User is NOT prompted for a passcode</li>
  <li>App UI is NOT shown</li>
  <li>Appropriate callback function is executed (working)</li>
  </ol>
  
  <p>Thanks.</p>