title: Google/Apple Push Notification Service (APNS/GCM)
body: <p>I'm trying to create application for Android and iOS and I want to use push notification on both the application. I'm going to have a server app that will be sending the notification.</p>
  
  <p>What I'm trying to figure out is how we can store the device of the user so I'll know which service need to be used APNS or GCM. </p>
  
  <p>One of the directions is to get the phone type to be set by the app and store this information on the server side, but what happens if the user changes his phone from iOS to Android, need to involve data storage of the user and collect information for every user, not covers scenario when user has Android tablet and iOS phone.</p>
  
  <p>Make it more generic and dispatch the notification to both services APNS and GCM at the same time, one of them will return error?</p>
  
  <p>Would love to hear what is the best practice for such scenarios?</p>