使用我的应用程序,我想要更改我的gmail或gtalk的状态。我怎样才能改变它?有没有示例代码??
提前谢谢。
发布于 2011-11-02 20:53:28
如果您使用的是安卓版Smack API:
// Create the presence object with default availability
Presence presence = new Presence(Presence.Type.available);
// Set the status message
presence.setStatus("Lame status is lame");
// Set the highest priority
presence.setPriority(24);
// Set available presence mode
presence.setMode(Presence.Mode.available);
// Send the presence packet through the connection
connection.sendPacket(presence);https://stackoverflow.com/questions/7980298
复制相似问题