message push-Baidu push
Choose Baidu Cloud Push reason: professional, stable, free (Google GCM in the country sometimes can not use the normal)
Open the URL, register the developer account, log in.
http://developer.baidu.com/bae/
Here the API key and secret key to use, you can first copy to Notepad to spare.
Download, install the APK client on your phone and open pushdemo.
Then test the push message in Dev Center
At this point the mobile phone will receive a push message
How to integrate into Phonegap/cordova
Add plugin Cordova plugin add com.cmpsoft.mobile.plugin.pushnotification
Compiling Cordova build Android
When the compilation is complete, open with ADT (Eclipse)
Copy apikey at Baidu Developer Center
Add the following code to the HTML page:
Fastgopushnotification.init ("Apikey");
Select Apikey, Paste.
Perform debugging
At this point you can use the developer center and push a message to test
You should be able to receive push messages on the emulator at this time.
Note: This plugin has no way to send for one or more clients, so it is necessary to encapsulate the channel_id and user_id on the phone side.
Modify source file Pushnotification.java
Modify the Sendpushinfo method,
To modify the Pushnotification.js file and to increase the method of receiving channel_id and user_id, please refer to the Official document or Device.js plugin.
Results
Service-Side Erection
Open download Baidu Cloud push service side (the current version of C #, to PHP and JSP, Python friends from here to download http://developer.baidu.com/wiki/index.php?title=docs/cplat/push/ SDK/SERVERSDK).
C # version Https://github.com/xiariqingquan/BaiduPushAspxServer
Open with Visual Studio and debug
1. Copy Apikey and Secretkey in the developer Center
2. Enter notification title and content
3, send the message.
To more features of their own packaging, hands-on ability to gradually achieve success!
SOURCE download
Exchange please add QQ Group: 166691882 (this group just built)
for Programmer Health Care 18136761128 (the cervical spine, sedentary guidance to chronic diseases, has been on CCTV, fake a penalty ten)
Cross-platform Mobile development Phonegap/cordova 3.3 Full series tutorial-Baidu Cloud push push