Hi,

I've spend my spare time for the last few months prototyping and
implementing an Android XMPP service.
Here is a short demo video of what's working:http://measite.de/
xmppservice.avi (music is "sad robot" by pornophonique [1]).

The basic concept is a bit different from classic xmpp apps: Every
Stanzas will be isolated by the transport service and broadcasted to
all interrested apps. The demo chat app is just a few hundred lines of
code, because acting on XMPP events is plain simple (4 lines of XML
plus implementing the BroadcastReceiver). Apps and Service are thus
isolated. Even app crashed won't cause the service to quit.

The source was just pushed to github:
http://github.com/rtreffer/AsmackService
http://github.com/rtreffer/AsmackChat
I thought LGPL 2.1 and Apache 2.0 would give every project a chance to
use it. There are still some Apache 2 only parts, but they are on my
to-be-replaced list.

Feature/Integration wise:
- Ping is done every minute, based on android time ticks
- Compression is done with the hidden Java7 API and reflection (this
can't break as the API should be frozen anyway)
- The roster is stored in the contacts db
- Roster fetch is done on global sync
- All XMPP accounts are managed by the android accounts system
- Broadcast Intents are used to push received messages to multiple

Bad:
- Still SASL/DNS libs, need to be replaced
- Presence updates can stall/kill the service
- Working with the android contacs api feels bad

TODO (short term):
- Rework presence
- Build more app APIs
- Get rid of all dependencies (sasl code is bad, the dns lib looks
wired, too)
- Better certificate handling (read: check it!)
- Add/Remove contacts
- Build a fancy demo app :-)

TODO (long term):
- AOSP: no idea if there is a chance for such a code drop, but I think
system wide XMPP should be part of every android phone.
- Build a smack compatible parser: Smack has the biggest OOP parsing
system I've seen.

Anyway, the code is open, give it a try. I'd be happy if others would
join the effort.

Regards,
    René Treffer

[1] http://www.pornophonique.de/music.php / 
http://www.jamendo.com/en/artist/pornophonique

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to