[jdev] XMPP on Android, Round #2

Rene Treffer treffer+jdev at measite.de
Tue Nov 2 14:00:48 CST 2010

On 11/01/2010 07:28 PM, Stephen Pendleton wrote:
> -----Original Message-----
> From: jdev-bounces at jabber.org [mailto:jdev-bounces at jabber.org] On Behalf Of
> René Treffer
> Sent: Friday, October 29, 2010 8:56 PM
> To: jdev at jabber.org
> Subject: [jdev] XMPP on Android, Round #2
>> Hi,
>> It's been some time since my last posting. But I didn't stop thinking 
>> about XMPP on Android devices. I've always been unhappy with asmack, 
>> because it's sort of a hack. It does solve a problem, mainly to reduce 
>> the amount of code to be written. But it doesn't solve the problem of 
>> nice phone integration. We've ended up with many jabber apps on Android, 
>> but none that's as native as e.g. a GTalk service.
> Very impressive work! I have done a few XMPP implementations on Android
> using a similar architecture (remote service+intents for stanza event
> notifications). I will look to switching to this implementation.
> One thing I think is missing from XMPP Android (and battery constrained
> devices in general) is the ability to re-establish a data connection only
> when an interesting event occurs when the application is in the background.
> In this case, an interesting event would be that a chat message, or other
> interesting stanza, arrived for me at the server. 
> For example, 95% of the time I am not actively interested in my XMPP app or
> want to maintain a data connection to my XMPP server but am running my XMPP
> app in the background on my phone. I only bring it to the foreground when I
> want to send a message or to read a message. For the former, the XMPP app
> will re-connect to the XMPP server when I am ready to send my message. For
> the latter case the google cloud push service
> (http://android-developers.blogspot.com/2010/05/android-cloud-to-device-mess
> aging.html) could be employed to notify my client that a message exists for
> me on the server. When I am ready to read it the XMPP app will re-connect
> and fetch the message for me. 

Not sure if there is really a problem. Power consumption was way below
Facebook or Twitter. With facebook, gtalk and my company jabber server
added as xmpp connection. This includes stuff like nagios bots hammering
on the connection. I'd post a screenshot but it simply doesn't show up
on cyanogenmod 6.1 (I saw it on MIUI, which has an extended battery
consumption list).

  Rene Treffer

More information about the JDev mailing list