Android asmack registration login chat multi-person chat room File Transfer (zz)

Source: Internet
Author: User
XMPP Protocol Introduction

The XMPP protocol (Extensible messaging and presenceprotocol) is an XML-based protocol designed to address timely communication standards, it was first implemented on jabber. It inherits the flexible development in the XML environment. Therefore, XMPP-based applications are highly scalable. XML is easy to pass through the firewall, so applications built with XMPP are not blocked by the firewall. Using XMPP as a general transmission mechanism, different applications in different organizations can communicate effectively.

This article has a basic introduction to http://blog.csdn.net/xutaozero21/article/details/4873439

Im

Instant Messenger and timely communication software are QQ, MSN Messenger, and Gtalk. Gtalk is an implementation based on the XMPP protocol, while others are not. At present, Im is an inevitable tool for almost every netman. There are some enterprise-level IM applications in large foreign enterprises, but its commercial value has not been fully realized yet. Imagine that XMPP is a public protocol, so every enterprise can use it to develop im suitable for its own business and improve its production efficiency; or even, you can also integrate this communication software in online games so that you can not only chat while playing, but also develop IM applications suitable for the game itself, such as some key game scenario reminder functions, team speech communication can be implemented based on IM.

 

This article mainly explains how to use XMPP protocol for instant communication in Android. Three main things are involved: openfire, smack, and spark, the combination of these three items is the complete implementation of XMPP im. Here we will briefly introduce the functions of these three items below:

Openfire is mainly used as a server to manage client communication connections and provide client communication information and connection information.

Smack is mainly implemented by the XMPP protocol and provides a set of good APIs. Therefore, the following operations on XMPP are implemented by using the smack API. Of course, because it is in Android, so we use the asmack package, which is similar to the smack package.

Spark is the implementation of the IM client, but it is actually implemented using the smack API.

 

Shows the relationship between the three: (obviously, this figure is stolen from others. Specifically, I forgot it, because the materials are copied to the document and I will study it slowly)

It can be seen from the figure that both the client and server can be extended through plug-ins, and smack is the medium for both to transmit data.

 

For more details and code, see:

Http://www.cnblogs.com/not-code/archive/2011/07/16/2108369.html

Related Article

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.