Then the previous work, after the message is received, is pushed to the different clients. About message push, there are many ways on the Internet, HTTP long connection, XMPP protocol, and a Google's seemingly called c2dm things.
Before that, a small demo was made with OpenFire, an example of which was found on the Internet. You can also implement some of the same features as ANDROIDPN, including point-to-point, broadcast messages, which are all XMPP protocols anyway.
The client is Android, so use ANDROIDPN.
This thing is written by Korean people, official documents are also Korean (hehe).
(a) Operating source code
Source code is compiled with MyEclipse, in Eclipse, to deal with, attributes have a project facets, modified. You can also create a new Web project to copy the contents of the original eclipse, but it is more troublesome. I use this kind of trouble way, no matter how, so that their own construction works, relatively clean.
Among them, there will be several considerations, the first is the configuration of the data source, this should be modified to their own database. The source is hibernate connection, in the configuration, can be modified. As long as the database connection is not a problem, the other generally do not error.
And then when it comes to running, something happens 404, like:
This inside, home,users,sessions these buttons.
Because the source is Sitemesh template technology, the address of the path should be in accordance with the original myeclipse, the problem should be caused by the new project, modify the Webroot below decorators the default file, A few connection paths inside the Tabmenu are modified to remove the front/right.
(ii) Source code operation
When a message is pushed, the Sendbroadcast or Sendnotifcationtouser method in the Notificationmanager class is called.
Here is the broadcast, which will send a string as the message body.
In our project, we can call this method to push the message.
Baidu Library has an introduction, about the use of the source of the two scenarios of the configuration.
Http://wenku.baidu.com/link?url=qW7UPz9p3v4VyuNJJc1H7jP4QY4uBKTJtNEBhPJRhakWD_OCN2kXvTLRH0fx7fg7Xd9J-NCX_ Jlvgjdu-kmnqjctk_sgms-6qagycqztfew
The main thing to note is that if spring is also present in your project, if there are data sources, these beans may conflict.