AndroidPn push test

Source: Internet
Author: User

AndroidPn push test
After the server is set up, push it to the client. According to the built-in client, the test can be performed on the simulator and the real machine respectively. However, due to the imperfect framework, various problems may occur. (1) There is also an android simulator problem. When the simulator is started, it will wait for a long time and then fail. Because it is directly started in eclipse, it is okay to first run the sdk Manager in the SDK, create a simulator, and then start it. (2) When running this client program in the simulator, you must note that modifying lib to libs is because of the upgrade of the adt version. Otherwise, the ClassNotFound class will not be found. Local simulator debugging, configuration: apiKey = 1234567890 xmppHost = 10.0.2.2xmppPort = 5222 local area network, host is the ip address of the server on the local area network. The Internet is the ip address of the Internet. (3) there is basically no problem in the simulator, and then there is a real machine. This problem is very strange. I am going to study it now. The real machine can connect to the server, but cannot receive the push. This is not the reason for the configuration. The client code is faulty. Solution: Modify public static final String SERVICE_NAME = "abc" in the NotificationService class, and then register the service in the registration file: <action android: name = "abc"/>. You can. Some people suspect that the service name cannot be too long. Android is rarely used. After the modification, the real machine can also receive the push information, but the server's console will report an error, but it does not affect the push. The specific cause must be determined after research. Error message: <org.androidpn.server.xmpp.net. xmppIoHandler>: java. lang. noClassDefFoundError: cocould not initialize class org. androidpn. server. xmpp. ssl. SSLConfig unless reprinted, other articles are original to the author and can be freely reproduced, but please indicate the address of the reprinted article, please respect the author's Labor achievements.

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.