Jabber Chatroom App

idleheadedceleryMobile - Wireless

Dec 10, 2013 (3 years and 9 months ago)

71 views

Jabber
Chatroom

App

“SMAC CHAT”

Android Platform, XMPP Protocol

CSE 677

Overview


Introduction to XMPP


XMPP, Jabber, and Android


App Design and Implementation


Live Demo

Introduction to XMPP

What is it, and why use it?

Background


e
X
tensible

M
essaging and
P
resence
P
rotocol


Created in 1999.


Application layer
protocol.


Open
-
source and open
-
standards.

What is it used for?


XMPP is a framework for building
applications that can
handle creating and moderating chat rooms,
messaging, and presence
functionality.


Instant
M
essaging


P
resence


Multi
-
Party
C
hat


Voice
and
Video
C
alls


Collaboration

Key Features


Decentralization


Architecture
is similar to email
.


No central master server.


Security


Servers
may be isolated from the public
network.


SASL and
TLS
has been built into the
core specifications.


Free
digital certificates
to
server
administrators.


Flexibility


Custom functionality can be built on top of
XMPP.

Why we chose it!


Key
Feature


Openness and ease of
use
.


Open
-
Source Compatibility


Compatible
packages available
for Java and Android
.


Robust support for multi
-
user
interaction.

XMPP
vs

Other Protocols

HTTP

XMPP

SERVER

YES

YES

ARCHITECTURE

CLIENT
-
SERVER

CLIENT
-
SERVER
-
CLIENT

INTERACTION

REQUEST
-
RESPONSE

SEND
-
AND
-
PUSH


HTTP Example:

XMPP, Jabber, and Android

Putting the puzzle together.

XMPP & Android


Android supports XMPP natively.


XMPP and Android’s open
-
source nature work well together.



XMPP is a protocol; a service is needed to utilize it.


Many free XMPP services are available.



Jabber


Jabber is:


The open standard for instant messaging.


One of the largest nodes on the XMPP network.


Free and easy service to register and sign up for.


Secure (SSL and TSL encryption).


Jabber supports Multi
-
User chats.


Handles connections from many platforms.


App Design and Implementation

How it works!

Design Features


Logging into Jabber.


Creating a public
chatroom
.


Joining a public
chatroom
.


Via a user account.


Via a room name
.


Chatting with multiple users.


Minimal user error checking.

The Foundation


Android, API Version 2.1


Wifi

Communications


XMPP


Smack, API Version 3.1.0

The Foundation (Cont’d)


Smack


Full
-
featured XMPP API for Java development.


Allows for “higher”
-
level coding.


aSmack


Android
-
compatible Smack package
.


Beem

Project


Up
-
to
-
date
aSmack

package(s).


Enhanced compatibility for more recent Android API
versions
.

The Foundation (Cont’d)


MultiUserChat


Supports multi
-
party chat defined by XMPP and Jabber.


Allows for quick setup of
chatrooms

on the Jabber servers using
an active XMPP connection.


Supports ease of message sending/retrieval via attaching
packet listeners to the
MultiUserChat

objects.

The Framework


XML Layouts


MainActivity.java


User
interface interaction
.


ChatSession.java


Backend handling of
session data.


XMPP connection
information.


MultiUserChat

fields.

Future Features


“Friends” List


Support for multiple XMPP services.


GoogleTalk


Enhanced Chat Features


User list in a room.


Presence Compatibility


Statuses: “
Available
”, “
Away
”, “
Offline


Live Demo

SMAC Chat in action.