Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9179691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:51:46+00:00 2026-06-17T17:51:46+00:00

I have a PhoneGap / Cordova app, and would like to add push notifications

  • 0

I have a PhoneGap / Cordova app, and would like to add push notifications using the urban airship plugin for PhoneGap. It looks promising. I try following the instructions from Urban Airship and look at the example at GitHub. The problem is that I am a html5-css3-JavaScript developer, not a Java / Android developer. I’m using Eclipse.

I changed the AndroidManifest.xml file like in the example, putting my package name where appropriate.

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”.

See the screenshow below for my progress so far and for the errors.

enter image description here

My questions are:

“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?

“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?

“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?

Any help would be greatly appreciated! I’ll even build you a simple Sencha Touch app if you help me get this working…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:51:48+00:00Added an answer on June 17, 2026 at 5:51 pm

    I had trouble setting it up too. This is what I did to finally get it working, in complement to what is said in this tutorial:

    1. copy the urbanairship[…].jar file in the libs folder of your
      project (this missing file is why you have errors on your
      printscreen)
    2. import the MainApplication.java, IntentReceiver.java files in your
      main package (come.waywayway.easyapp). Update the package names in
      those files. I also had to replace ACTION_LOCATION_SERVICE_BOUND
      with ACTION_SUFFIX_LOCATION_SERVICE_BOUND in IntentReceiver
    3. import the PushNotificationPlugin.java file in a
      com.urbanairship.phonegap.plugins package (place it in src/com/urbanairship/phonegap/plugins), update the IntentReceiver import
      with your package name, and make sure to link to the
      plugin in res/xml/config.xml, e.g.:

      <plugin name="PushNotificationPlugin" value="com.urbanairship.phonegap.plugins.PushNotificationPlugin"/>
      
    4. update your main activity class(easyapp.java) to match the sample
      app main activity class (UAPhonegapSample.java)
    5. import and update your airship.properties and location.properties
      files as explained in the tutorial
    6. Based on the sample app AndroidManifest.xml file, update yours.
      Don’t forget to add android:name=”.MainApplication” as an attribute
      to the application object

    Once this is done, you should be able to send a test notification from urban airship console. Your device APID should show up in Eclipse console when you launch your app. You don’t need the Javascript files if you just want to be able to receive notifications.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an IOS app built with phonegap/cordova 2.1.0 and I would like to
I'm trying to add facebook connect login to my phonegap/cordova app using the https://github.com/mgcrea/cordova-facebook-connect
I'm building an app using Xcode 4.5.1, Cordova/Phonegap 2.1 with the ChildBrowser plugin. I
I am developing an iPhone/iPad App using phonegap/cordova. Now as i have to integrate
I am using phonegap(cordova 2.1.0) for IOS/android app development. Every time i have to
I have a problem. I would like to download pictures with phonegap cordova 2.1
I have tested to send push notifications with cordova-1.8.1.js and the push plugin together
I am creating an app using PhoneGap 1.5 (Cordova) and the ChildBrowser Plugin (newest
I have a PhoneGap app that is using the Localytics services and I would
I am building a PhoneGap/Cordova app and have a simple code that uses http://ricostacruz.com/jquery.transit/

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.