title: Set up urban airship push notifications with phonegap on android
body: <p>I have a PhoneGap / Cordova app, and would like to add push notifications using the <a href="http://urbanairship.com" rel="nofollow noreferrer">urban airship</a> plugin for PhoneGap. It looks promising. I try following the <a href="https://docs.urbanairship.com/display/DOCS/Client:+PhoneGap:+Android+Integration" rel="nofollow noreferrer">instructions from Urban Airship</a> and look at the <a href="https://github.com/urbanairship/phonegap-ua-push/tree/master/android-sample" rel="nofollow noreferrer">example at GitHub</a>. The problem is that I am a html5-css3-JavaScript developer, not a Java / Android developer. I'm using Eclipse.</p>
  
  <p>I changed the AndroidManifest.xml file like in the example, putting my package name where appropriate.</p>
  
  <p>I imported the .java files PushNotificationPlugin.java, IntentReceiver.java and MainApplication.java into my project tree in the src folder. Now errors appear, for example "The import com.urbanairship.UAirship can not be resolved".</p>
  
  <p>See the screenshow below for my progress so far and for the errors.</p>
  
  <p><img src="https://i.stack.imgur.com/essso.png" alt="enter image description here"></p>
  
  <p>My questions are:</p>
  
  <p>"Install the PushNotificationPlugin.java and IntentReceiver.java files into your Android project."
  Where do I have to place these files in the project tree, and do I have to link to them in any way?
  Should I also install the file MainApplication.java somewhere and how?</p>
  
  <p>"Initialize the Urban Airship library in your Application class"
  Which file in my PhoneGap project tree is the Application class and where in this file can I copy-paste the Urban Airship code?</p>
  
  <p>"Instrument your main Activity class"
  I have to add those few lines of Java to the Cordova main activity. Which file contains the Cordova main activity and where in this file can I copy-paste that so much desired Urban Airship code?</p>
  
  <p>Any help would be greatly appreciated! I'll even build you a simple Sencha Touch app if you help me get this working...</p>