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, schedulepublic static PushNotificationsManager getInstanceFor(XMPPConnection connection)
connection - public boolean isSupported() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionInterruptedExceptionpublic boolean enable(Jid pushJid, String node) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
pushJid - node - SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionInterruptedExceptionpublic boolean enable(Jid pushJid, String node, HashMap<String,String> publishOptions) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
pushJid - node - publishOptions - SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionInterruptedExceptionpublic boolean disableAll(Jid pushJid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
pushJid - SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionInterruptedExceptionpublic boolean disable(Jid pushJid, String node) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
pushJid - node - SmackException.NoResponseExceptionXMPPException.XMPPErrorExceptionSmackException.NotConnectedExceptionInterruptedException