public final class GeoLocationManager extends Manager
Constructor and Description |
---|
GeoLocationManager(XMPPConnection connection) |
Modifier and Type | Method and Description |
---|---|
static GeoLocationManager |
getInstanceFor(XMPPConnection connection)
Retrieves a
GeoLocationManager for the specified XMPPConnection , creating one if it doesn't
already exist. |
static boolean |
isGeoLocationMessage(Message message)
Returns true if the message contains a GeoLocation extension.
|
void |
sendGeolocation(GeoLocation geoLocation)
Send geolocation through the PubSub node.
|
void |
sendGeoLocationToJid(GeoLocation geoLocation,
Jid jid) |
void |
stopPublishingGeolocation()
Send empty geolocation through the PubSub node.
|
connection, getAuthenticatedConnectionOrThrow, schedule
public GeoLocationManager(XMPPConnection connection)
public static GeoLocationManager getInstanceFor(XMPPConnection connection)
GeoLocationManager
for the specified XMPPConnection
, creating one if it doesn't
already exist.connection
- The connection the manager is attached to.public void sendGeoLocationToJid(GeoLocation geoLocation, Jid jid) throws InterruptedException, SmackException.NotConnectedException
public static boolean isGeoLocationMessage(Message message)
message
- the message to check if contains a GeoLocation extension or notpublic void sendGeolocation(GeoLocation geoLocation) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, PubSubException.NotALeafNodeException
public void stopPublishingGeolocation() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, PubSubException.NotALeafNodeException