Does anyone know how to change the online status for a user by invoking it from another application? Ideally I'd like to invoke Talk to change the users status to "Away" during some periods when using my application. Would be nice not having to use xmpp and access the internet from my app but rather "do it locally" and let Talk distribute the status change.
Maybe Im blind and/or stupid but I cant find any info on this.
To get the status you are going to have to send a query to the Conacts.CONTENT_URI along with the id you are trying to get. Then in the projection you must include Contacts.CONTACT_PRESENCE. This will return an integer that you can look up using the StatusUpdates class.
So to change the CONTACT_PRESENCE just send a query updating that column with correct CONTENT_URI and id.