Reputation: 11
thank you in advance for reading this relatively long request. I'm trying to integrate my phonegap application with Urban Airship (UA). I only have javascript and html knowledge. Here are my questions:
2.) Once I somehow access the airshipconfig, are these following values correct ? gcmSender is the "Project Number" that is displayed in Google apis Dashboard? transport has value gcm, developmentAppKey is the App Key that Urban Airship (UA) has provided me?, developmentAppSecret is the Dev secret that UA has provided me? productionAppKey is the same as developmentAppKey?, productionAppSecret is the same as developmentAppSecret? inProduction is false?
3.) After this part, I'm lost. I've downloaded the phonegap plugin (http://urbanairship.com/resources/developer-resources). After I completed the above steps 1.) and 2.), should I go back to the parent page (...urbanairship.com/build/phonegap.html) and go to "Manual Integration" section?
4.) In "Manual Integration : Android Integration" section, what src/Android/*.java files do I copy from? And should I create a new empty directory src/com/urbanairship/phonegap folder and move files in it?
5.) I see urbanairship-lib-3.0.0.jar in the UA phonegap plugin, do I put this into the root of my project's libs directory?
6.) Assuming I can get through the above steps, the last section of "In "Manual Integration : Android Integration" section" tells me to modify the AndroidManifest.xml and config.xml, have I successfully integrated UA into phoneGap ? Can you show me how to send a push notification to my application?
7.) Also, the plugin states that it works only for Phonegap 3.0.0+ but I went to Phonegap.com and it is only up to version 2.9.0? I have phonegap 2.5, will it work? Thanks so much for your help! Ning
Upvotes: 1
Views: 1042
Reputation: 813
1) You have to create the airshipconfig.properties file:
docs.urbanairship.com/build/android.html#setting-up-gcm-support-for-your-app(link for set up gcm)
2) The keys are the keys and secret (not master secret) that UA provides. Essentially: development -> development (with inProduction = false) production -> production (with inProduction = true) Do not mix these up otherwise you will not have the correct credentials to send and receive a push!
3) I recommend the manual integration, it really helps with understanding it's overall functionality..
4) The files should have been created in steps in the general android integration
5) No, into your libs directory
6) Sending push messages: docs.urbanairship.c om/dashboard/walkthrough.html ( if you're on a free version it'll look differently) docs.urbanairship.c om/reference/api/v3/push.html support.urbanairship.com/customer/portal/articles/1069013-helpful-curl-examples
7) It's at 3.0.0 ->
docs.phonegap.com/en/edge/guide_platforms_android_upgrading.md.html#Upgrading%20Android
Overall I highly recommend looking at UA's sample apps. They don't have a sample with phonegap and the latest version, but you can always check out the previous versions: github.com/urbanairship/phonegap-ua-push/tree/1.07
PS sorry for the links, I don't have enough reputation to post more than two apparently :(
Upvotes: 1