Java – how to implement XMPP to send push notifications

I want to use XMPP so that my app will send updates to Android phones (1.5 and later) I'd like to use XMPP to send push notifications to my mobile phone

How will I achieve this At present, my web application is running Apache tomact and some servlets, so Android phones can access information, but I find it difficult to understand how I implement XMPP so that I can push information from the server to the client (Android phones)

I have tested the following tutorial example of XMPP with Google ID login

It uses Google ID to log in But I need to use my web application to make Google tools Any ideas?

Solution

It depends on the nature of your push (point or idea) In both cases, you will need your client and application to connect to the XMPP server This will be the way your application sends notifications to clients

I don't know what you mean "what do I need to implement with my web application" Your web application will be the client of the XMPP server, just like your mobile phone You can't use XMPP to simply talk to your web application unless it's really a bosh enabled XMPP server itself. I guess it's impossible

You can use smack for client communication or any of the many available servers

If the communication is for a specific client, creating a chat between the application and the client may be the easiest way If it is more broadcasting, you can use MUC (multi user chat) or PubSub

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>