public final class PushNotificationsManager extends Manager
Modifier and Type | Method and Description |
---|---|
boolean |
disable(Jid pushJid,
String node)
Disable push notifications of an specific node.
|
boolean |
disableAll(Jid pushJid)
Disable all push notifications.
|
boolean |
enable(Jid pushJid,
String node)
Enable push notifications.
|
boolean |
enable(Jid pushJid,
String node,
HashMap<String,String> publishOptions)
Enable push notifications.
|
static PushNotificationsManager |
getInstanceFor(XMPPConnection connection)
Get the singleton instance of PushNotificationsManager.
|
boolean |
isSupported()
Returns true if Push Notifications are supported by this account.
|
connection, getAuthenticatedConnectionOrThrow, schedule
public static PushNotificationsManager getInstanceFor(XMPPConnection connection)
connection
- public boolean isSupported() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public boolean enable(Jid pushJid, String node) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
pushJid
- node
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public boolean enable(Jid pushJid, String node, HashMap<String,String> publishOptions) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
pushJid
- node
- publishOptions
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public boolean disableAll(Jid pushJid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
pushJid
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public boolean disable(Jid pushJid, String node) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
pushJid
- node
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException