Androidpn environment Establishment

Source: Internet
Author: User

Androidpn Environment

Androidpn pushes text messages from the server to the Android mobile platform. Here we will briefly describe the installation process of androidpn.

Download androidpn-client-0.5.0.zipand androidpn-server-0.5.0-bin.zip

Web: http://sourceforge.net/projects/androidpn/

Decompress two packages, import eclipse to the client, configure the target platform, and open the raw/androidpn. properties file,

Apikey = 1234567890

Xmpphost = 10.0.2.2

X mppport = 5222

For a simulator to run the clientProgramConfigure xmpphost to 10.0.2.2 (the simulator considers 10.0.2.2 as the address of the host, and 127.0.0.1 as the loopback address of the simulator ).

Xmppport = 5222 is the XMPP service listening port of the server.

Run androidpn-server-0.5.0 \ bin \ Run. bat starts the server and accesses http: // 127.0.0.1: 7070/index from the browser. do (androidpn server has a lightweight web server that listens to requests on port 7070 and receives text messages from users)

When a client is running, the client initiates a connection request to the server. After successful registration, the server can identify the client and maintain a persistent connection with the client's IP address.

Enter the notifications page and enter the message to send.

The simulator client receives messages pushed to the server.

In this way, the androidpn environment is ready. Next, I will study and implement the XMPP protocol in depth.

Xiaobai

DevXiaobai@gmail.com

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.