public class VersionManager extends Manager
The VersionManager takes care of handling incoming version request IQs, according to XEP-0092 (Software Version). You can configure the version reply for a given connection by running the following code:
Version MY_VERSION = new Version("My Little XMPP Application", "v1.23", "OS/2 32-bit"); VersionManager.getInstanceFor(mConnection).setVersion(MY_VERSION);
Modifier and Type | Method and Description |
---|---|
static VersionManager |
getInstanceFor(XMPPConnection connection) |
Version |
getVersion(String jid)
Request version information from a given JID.
|
boolean |
isSupported(String jid) |
static void |
setAutoAppendSmackVersion(boolean autoAppendSmackVersion) |
static void |
setDefaultVersion(String name,
String version) |
static void |
setDefaultVersion(String name,
String version,
String os) |
void |
setVersion(String name,
String version) |
void |
setVersion(String name,
String version,
String os) |
void |
unsetVersion() |
connection
public static void setDefaultVersion(String name, String version)
public static void setDefaultVersion(String name, String version, String os)
public static VersionManager getInstanceFor(XMPPConnection connection)
public static void setAutoAppendSmackVersion(boolean autoAppendSmackVersion)
public void setVersion(String name, String version)
public void setVersion(String name, String version, String os)
public void unsetVersion()
public boolean isSupported(String jid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException
public Version getVersion(String jid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException
jid
- null
if not supported by JIDSmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException