This article link: http://blog.csdn.net/kongxx/article/details/8155916
1. First register an account in Urbanairship, he has free account available, trial 45 days.
2. After the registration, create an app, the content is relatively simple to look at the fill on it.
3. After the app is generated, go to the Property modification page and change the Android package to the project package name that you want to use. If need GCM support, need to send mail to urbanairship, generally will soon be approved, I was the next day on the grant down.
4. Download the latest development package on the download page of urbanairship, where I download the 2.0.1 version. After decompression, build the project with Eclipse, select Pushsample directory to import the project.
5. Change all of the package names to the name of the package you defined above (search some, place more).
6. Need to pay attention to the project has two files Androidmanifest.xml and androidmanifest-helium.xml, we first use helium to test, the original androidmanifest.xml file renamed ANDROIDMANIFEST-GC M.xml, will androidmanifest-helium.xml renamed into Androidmanifest.xml.
7. Modify the Assets/airshipconfig.properties file and modify the Developmentappkey in the app properties page to see Developmentappsecret on the App properties page Transport = Helium
8. Run AVD and test program, here I use the Android4.1.2 Google APIs simulator. Note Look up the apid in the log, remember the value, and use it later. Then select the "Push Enabled" checkbox for the application's "Preferences".
9. Select the app created above in Unbanairship and select "Push"-> "Apids" in the left-hand navigation to view the registered device.
10. In the "Push"-> "Test push Notification"-> "Android", in the apid of the form, output the remembered Apid, enter a message in alert, and press the Send button. You'll see the results on the simulator at this point.
GCM Support 11.1 If you need to use GCM Support (reference http://developer.android.com/guide/google/gcm/index.html), you need to first http:// Code.google.com/apis/console builds a project and fills it with the project ID in the Unbanairship app attribute. 11.2 renamed Androidmanifest-gcm.xml into Androidmanifest.xml, modify assets/airshipconfig.properties file, modify the following content, here need to pay attention to IS Developmentappkey on the App properties page you can see Developmentappsecret on the app properties page transport = GCM Gcmsender = <project id> (at Google AP is console get there 11.3 run the Android program again and then test in unbanairship.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.