Communication between Android client and PHP server (3) --- Aurora push registration and use, android Server
Overview
There are many ways to push messages. Here I chose Aurora push. This section consists of two parts: Register Aurora push and use its Demo program to view the push effect, and then modify it to your application step by step.
Register logon Aurora push
Developers basically know how to use third-party libraries. Many of them need to be registered for use, and Aurora push is no exception. Log on to the Aurora push official website at https://www.jpush.cn/. the registration process is not described. Log on directly after registration,
After logging on, you can see that you have not created any applications.
Create an application
Click "create application". The page changes.
Enter the application name and upload the application icon as needed. In the Android environment, enter the package name of the application you want to create in the Android column, as shown in the following figure (programmers and friends love life and technology, and must cherish their bodies)
After entering the information, click "create my application". The application is successfully created.
Download and use Aurora push instance Program
Click "Download Android Example" in the red box and save it to the specified location on your computer.
The built-in instance program does not contain the APK file. If you open the program with Eclipse, the following error may occur:
[21:45:54-JPushExample (269090)] Unable to resolve target 'android-10'
[21:45:54-JPushExample (269090)] Project compiler settings changed. Clean your project.
[21:45:55-JPushExample (269090)] Unable to resolve target 'android-10'
This is because the SDK packages that support this version are not downloaded in Eclipse. The solution is to set the project. in properties, replace target = android-10 with the supported version. Here I replace it with target = android-18, and then press F5 or right-click the project and select Refresh.
Run the software
Then return to the application page pushed by Aurora
Select push \ send notification, and click send now
Now you can see the notification on the mobile phone.
End
As a matter of fact, I think most programmers should know how to do it, that is, compare the official documentation of Aurora push and the sample code, modify and transplant the code to their own programs, in the next section, I plan to analyze the framework of the sample program for self-porting.
/*************************************** **************************************** *****************
Original article, reprinted please note URL: http://blog.csdn.net/mybelief321/article/details/45445667
* Luyang Gaoke Studio
* Address: www.bigbearking.com
* QQ For Business Cooperation: 1519190237
* Business model: website construction, desktop software development, Android/IOS development, image post-processing, and PCB design
**************************************** **************************************** ***************/