Development Notes--the XMPP-based Android Instant messaging app (i)

Source: Internet
Author: User
Tags administrator password

2015 has gone through one months, and in January, two video tutorials were shared. I personally saw some of them, or is very good, is the teacher speaking slowly point, occasionally a bit sleepy, I do not know the friends will have the same feeling, hehe.

About the already started XMPP Instant Messaging client has actually been a project to be completed, but has been plagued by work, has not been empty. Fortunately, there is a little time to sneak in.

Then as the first article, Nature is the development of the environment to build and development of the pre-preparation . Perhaps the code is not much, perhaps the content of the article also seems very young, so welcome all the predecessors came to shoot bricks, I like the board!

The first is the Server section :

This section will not introduce too much because we focus on the development of the client.

I chose OpenFire here, why choose this? simple configuration, code open, used .

First of all, this server software is cross-platform, compatible with Windows, Linux, Mac.

In this interface, we will see the OpenFire installer and the green version of the compressed file, as well as spark. To download them all.

Here is a tip, if your system, installed JDK is 1.7 and above the 32-bit version, it is best to download the green version of OpenFire, because the installation will be the installation process has just begun to error, resulting in the inability to continue (or perhaps character problem). Then spark directly download EXE installation can, using similar QQ, casually look should be able to use, in the future we will make use of this client and we developed mobile phone app interoperability, mutual add friends, chat, transfer files and so on .

Unzip the OpenFire software package that we just downloaded, put it in a fully English path, such as D:\Openfire, and then check the database software in the system. OpenFire supports many database connections, I'm taking SQL Server R2 as an example , and of course, if the database engine is not installed in the system, you can choose an embedded database.


, first open SQL Server Configuration Manager to make sure that the database engine is already running.


Finally, make sure that the TCP connection is allowed, as configured:


Restart the SQL Server service and create a new database called "OpenFire" to start the configuration of the server.

Start the server, open the extracted folder, go to the Bin directory, double-click Openfire.exe, wait for the program to run for a while, click the "Launch Admin" button to open the console.

The program can choose Chinese language, the next step, come to the database configuration interface, I choose SQL Server here, and then enter the following information:

Database url:jdbc:jtds:sqlserver://localhost:1433/openfire;appname=jive

The user name and password are SA. (filled in when SQL Server is installed)

Next, proceed to the next step, fill in the Administrator's password (remember, each login to use), the configuration of the server completed.

Finally log in to the server, log in with the administrator password you just set up, and if everything goes well, you will get the management interface as shown:


In order to test the operation of the server is normal, using the previously downloaded Spark client registration and login, this step is no longer mentioned, the use of QQ friends should be quick to get started.

If you can register and log in properly, then it proves that our server configuration is correct, and we can use it to develop the Android client app. This app will use the Asmack.jar library, in the next series, will be described in detail the use of the library and how to maintain long-connected applications, etc., I hope you come to join!

Development Notes--the XMPP-based Android Instant messaging app (i)

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.