title: Recommended way to implement Push Notifications
body: <p>I am building an App for Android and iPhone. This app needs to receive notification for new messages in user's inbox. Being a total noob in app dev, I was wondering if any of you guys could suggest the best way to implement what I need here.</p>
  
  <p>I have read up more on Android than iPhone so my understanding of latter may be wanting. Based on what I have read and understood, I believe that I will need to start a service when my app launches for the first time (or instruct the device to start the service every time the device starts or something). This service will then interface with a server to receive notifications and display them. Clicking on the notification will launch the app.</p>
  
  <p>My options are </p>
  
  <ol>
  <li><p>C2DM or APNS</p></li>
  <li><p>Urban Airship</p></li>
  <li><p>My own server using mostly idle TCP connection with client.</p></li>
  </ol>
  
  <p>Depending upon the option I choose, my client side implementation as well as server side implementation changes.</p>
  
  <p>What will you guys recommend? Is there any other way to do what I need done?</p>
  
  <p>Any help is greatly appreciated.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Building on jbat100 answer. The fact that Apple does not allow me to write my own server to communicate directly with my app for notifications means that APNS must be used. So option 3 is out altogether. This means we are left with either Urban Airship or interfacing directly with APNS and C2DM. Based on my research, the effort involved in both cases is comparable so it does not make sense to shell out 4-5K /mo extra just to support notification. So I plan to implement option 1. If any of you think otherwise, please leave comments below.</p>
  
  <p>Thanks.</p>