Implementing c # and android message push by apollo (1 ),
Previously, c # pushed messages to the mobile phone end. Due to network requirements, Baidu and other ready-made push services were not supported. After checking a lot of information, I finally sorted the information and recorded it, that is, the review is also expected to help.
My development environment is windows, and the Apache Apollo developed by java is used as the proxy server. Therefore, if you want to develop a java environment first, download the java jdk on your own, jre builds a java environment.
The required software and packages are the proxy servers of apache apollo, org. eclipse. paho testing software, android package org. eclipse. paho. client. mqttv3-1.0.1.jar, c # package M2Mqtt. dll, which will be provided later at http://download.csdn.net/download/wpfsbbx/10006429.
1. Set up an apache apollo Proxy Server:
A. Download Apollo and decompress it to the specified directory, for example, D: \ messPush \ apache-apollo-1.7.1 \ apache-apollo-1.7.1.
B. Run apollo. cmd in the bin directory.
C. Run the "apollo create mybroker" command on the current bin directory to generate an instance of the apollo broker. The "mybroker" folder appears in the bin directory.
D cd: run the "apollo-broker run" command in the "bin" directory of the "mybroker" folder in the "bin" directory. log on to 127.0.0.1: 61680 and configure the user name and password, if you need to modify it, you can modify it under the "etc" folder in the "mybroker" folder. xml. Do not close this window. Otherwise, the proxy server will stop and the website will not be able to log on. You can generate services for later deployment. It will be explained in the following examples.
E. log on to 127.0.0.1: 61680 and check your results.