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.