Android client communication with PHP server (iii)-Aurora push usage

Source: Internet
Author: User
Tags php server
Overview
There are many ways to push messages, and here I have chosen the Aurora push. This section is divided into the upper and lower parts, first by registering the Aurora Push and using its demo program to see the effect of push, and then step-by-step modification to their own application.
Sign up for Aurora push
Developers are basically aware of the use of third-party libraries, many of which need to be registered to use, Aurora push is no exception. Direct login to the Aurora Push official website https://www.jpush.cn/, register their own account, the registration process is not introduced, this will. After registering for direct login,
After you sign in, you can see that you haven't created any apps yet.


Create an app
Click "Create App" to change the interface.


According to your own needs, enter the application name, upload the app icon, while I am using the Android environment development, in the Android column to fill in the app you are about to create the package name, I filled in as shown (Programmer friends love life love technology and must cherish their own body AH)


When you're finished, click "Create my App" to see that the app was created successfully


download and use the aurora to push the instance program
Click "Download Android Example" in the Red Line box and save it to your computer's designated location.

There is no apk file in your own instance program, and the following error may occur when you open the program with Eclipse
[2015-05-02 21:45:54-jpushexample (269090)] Unable to resolve target ' android-10 '
[2015-05-02 21:45:54-jpushexample (269090)] Project compiler settings changed. Clean your project.
[2015-05-02 21:45:55-jpushexample (269090)] Unable to resolve target ' android-10 '
This is because my eclipse does not download the SDK package that supports this version, the workaround is to replace the target=android-10 in project.properties with the supported version, and here I replace the target=android-18, Then press F5 or right-click on the project to select Refresh.
Run the software at this time


Then go back to the app page of the Aurora push


Select push \ Send notification, click Send Now



Now you can see the push notifications on your phone.




End
In fact, I think most of the program designers should know how to do it, that is, the official documents and the sample code that are pushed by the Aurora, the modifications are ported to their own programs, and the next section I'm going to modify the porting to my demo program.

/************************************************************************************************

* Luyang High Tech Studio

* Website: www.bigbearking.com

* Business Cooperation qq:1519190237

* Business Scope: Website construction, desktop software development, Android\ios development, image and film post-processing, PCB design

***********************************************************************************************/
  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.