UTNotifications  1.5
Professional Local & Push Notification Plugin
Static Public Member Functions | List of all members
DemoServer.PushNotificator Class Reference

The sample class showing how you can send push notifications for different "providers", such as iOS, Google Play and Amazon. More...

Static Public Member Functions

static int notifyAll (String title, String text, String serverMessage, String notificationProfile) throws Throwable
 Sends a push notification to every registered device. More...
 
static int notifyItems (List< Registrator.Item > items, String title, String text, String serverMessage, String notificationProfile) throws Throwable
 Sends a push notification to every device in items list. More...
 
static int notifyGooglePlay (List< Registrator.Item > items, String title, String text, String serverMessage, String notificationProfile) throws Throwable
 Sends a push notification to Google Play devices. More...
 
static int notifyAmazon (List< Registrator.Item > items, String title, String text, String serverMessage, String notificationProfile) throws Throwable
 Sends a push notification to Amazon android devices. More...
 
static int notifyIOS (List< Registrator.Item > items, String title, String text, String serverMessage, String notificationProfile) throws Throwable
 Sends a push notification to iOS devices. com.notnoop.apns library is used for it (its source code is provided). More...
 
static int notifyWindows (List< Registrator.Item > items, String title, String text, String serverMessage, String notificationProfile) throws Throwable
 Sends a push notification to Windows/Windows Phone devices. More...
 

Detailed Description

The sample class showing how you can send push notifications for different "providers", such as iOS, Google Play and Amazon.

Member Function Documentation

static int DemoServer.PushNotificator.notifyAll ( String  title,
String  text,
String  serverMessage,
String  notificationProfile 
) throws Throwable
static

Sends a push notification to every registered device.

static int DemoServer.PushNotificator.notifyAmazon ( List< Registrator.Item >  items,
String  title,
String  text,
String  serverMessage,
String  notificationProfile 
) throws Throwable
static

Sends a push notification to Amazon android devices.

Note that in order to correctly support Unicode characters, title, text and any other text values should be URL-encoded: title = java.net.URLEncoder.encode(title); text = java.net.URLEncoder.encode(text); serverMessage = java.net.URLEncoder.encode(serverMessage); See also: https://developer.amazon.com/public/apis/engage/device-messaging/tech-docs/06-sending-a-message

static int DemoServer.PushNotificator.notifyGooglePlay ( List< Registrator.Item >  items,
String  title,
String  text,
String  serverMessage,
String  notificationProfile 
) throws Throwable
static

Sends a push notification to Google Play devices.

Note that in order to correctly support Unicode characters, title, text and any other text values should be URL-encoded: title = java.net.URLEncoder.encode(title); text = java.net.URLEncoder.encode(text); serverMessage = java.net.URLEncoder.encode(serverMessage); See also: https://developer.android.com/google/gcm/server.html

static int DemoServer.PushNotificator.notifyIOS ( List< Registrator.Item >  items,
String  title,
String  text,
String  serverMessage,
String  notificationProfile 
) throws Throwable
static

Sends a push notification to iOS devices. com.notnoop.apns library is used for it (its source code is provided).

Note that iOS Registration Ids are considered as Base64- or HEX- encoded APNS tokens (which are originally binary buffers).

See also
UTNotifications.Manager.OnSendRegistrationId

See also: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html.

static int DemoServer.PushNotificator.notifyItems ( List< Registrator.Item >  items,
String  title,
String  text,
String  serverMessage,
String  notificationProfile 
) throws Throwable
static

Sends a push notification to every device in items list.

static int DemoServer.PushNotificator.notifyWindows ( List< Registrator.Item >  items,
String  title,
String  text,
String  serverMessage,
String  notificationProfile 
) throws Throwable
static

Sends a push notification to Windows/Windows Phone devices.

Note that in order to correctly support Unicode characters, title, text and any other text values should be URL-encoded: title = java.net.URLEncoder.encode(title); text = java.net.URLEncoder.encode(text); serverMessage = java.net.URLEncoder.encode(serverMessage);

See also: https://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx


The documentation for this class was generated from the following file: