This information is prepared based on my understanding of XMPP systems, on the fact that Hangouts is not XMPP, and on the threads I linked to. I’ve sorted out the user-originating speculation that seems most useful. Hopefully I’ve given enough search-friendly keywords so someone saves time I’ve lost figuring out what’s the culprit.
By looking at XMPP resources (a fancy name for ‘connection identifiers’) using the most awesome XMPP client out there, Psi, and then digging around old Google Groups posts from late April and May 2013, all the way across the summer, I’ve identified the culprit of why my Google Talk account was appearing as “Away”.
If there is a resource connected to your gmail.com account called something similar to “MessagingXXXXXXX”, that’s the ‘new’ Google Hangouts (the one that doesn’t play nicely with XMPP). And quite possibly it’s the Android application for Google Hangouts.
That was hard to figure out because, among other things, the Hangouts service refuses to talk to my external non-Google XMPP accounts. So I was completely flabbergasted that I did not get a response to handcrafted
So yes, Google Hangouts stays connected even if the device you’ve logged into from is not. Apparently this is a connection that’s created internally, inside Google, from their Hangouts service to their Talk service — from the new IM tech to the XMPP tech. And if you try to trick the XMPP service to sign out Hangouts (for example, by creating a new connection with identical XMPP resource), the Hangouts will happily log back into XMPP in your name and present you as ‘away’. And messages intended to be stored offline will end up in Hangouts, never to be seen again unless you use Hangouts on other systems.
In threads I linked to, users claim clearing and reinstalling Hangouts might mean getting a new static per-device XMPP identifier. Others claim that clearing data for various subsystems (Google Play Services, Google Hangouts, etc), revoking two-factor codes, OAuth tokens and single-application-passwords might help.
Aside from turning on the device and logging out, the solution seems to be: wait for 30 days until the connection times out. So, do NOT wipe a device clean unless you’re ready to wait for 30 days to be signed off in front of your friends. Do NOT give the device out before you explicitly sign out of Hangouts (don’t just ‘restore’ it and wipe it).
Or it may just be easier to log out.
Which is what I did: I turned on the laptop, I fired up the VirtualBox machine where AndroVM was installed, and I signed out. (Imagine that: accidentally firing up Hangouts, force-shutting down the VM and then spending several night-time hours scratching your head and feeling miserable in all sorts of ways because technology is disobeying again. Ah.)