Android Client Reference
Class Notifications
Namespace: com.playerio
Language: Java
The Notifications service.
In order for the app to be able to receive push notifications, it must first enable Google Cloud Messaging in the Google Developer Console and obtain a GCM sender ID. See
Methods | |||
---|---|---|---|
public void |
Deletes the given endpoints |
||
public NotificationEndpoint[] |
The list of notification endpoints registered for the current client. |
||
public void |
Refreshes MyEndpoints public void refresh() throws PlayerIOError { NotificationsRefreshOutput output = channel.notificationsRefresh(version); refreshed(output.Version, output.Endpoints); } Refreshes MyEndpoints |
||
public void |
Register a device or endpoint with Player.IO. |
||
public void |
Send one or more notifications |
||
public void |
Enables or disabled the given endpoints. |
Notifications.deleteEndpoints
public void |
|
Deletes the given endpoints
Arguments
NotificationEndpoint[] | endpoints |
Callback<Void> | callback |
Notifications.getMyEndpoints
public NotificationEndpoint[] |
|
The list of notification endpoints registered for the current client.
Notifications.refresh
public void |
|
Refreshes MyEndpoints public void refresh() throws PlayerIOError { NotificationsRefreshOutput output = channel.notificationsRefresh(version); refreshed(output.Version, output.Endpoints); } Refreshes MyEndpoints
Arguments
Callback<Void> | callback |
Notifications.registerEndpoint
public void |
|
Register a device or endpoint with Player.IO.
Arguments
String | endpointType |
String | identifier |
Map<String,String> | configuration |
boolean | enabled |
Callback<Void> | callback |
Notifications.send
public void |
|
Send one or more notifications
Arguments
Notification[] | notifications |
Callback<Void> | callback |
Notifications.toggleEndpoints
public void |
|
Enables or disabled the given endpoints.
Arguments
NotificationEndpoint[] | endpoints |
boolean | enable |
Callback<Void> | callback |