UTNotifications  1.6
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 APNS, GCM, ADM and WNS. More...

Static Public Member Functions

static int notifyAll (int id, String title, String text, String serverMessage, String notificationProfile, int badge) throws Throwable
 Sends a push notification to every registered device. More...
 
static int notifyItems (int id, List< Registrator.Item > items, String title, String text, String serverMessage, String notificationProfile, int badge) throws Throwable
 Sends a push notification to every device in items list. More...
 
static int notifyGooglePlay (int id, List< Registrator.Item > items, String title, String text, String serverMessage, String notificationProfile, int badge) throws Throwable
 Sends a push notification to Google Play devices. More...
 
static int notifyAmazon (int id, List< Registrator.Item > items, String title, String text, String serverMessage, String notificationProfile, int badge) throws Throwable
 Sends a push notification to Amazon android devices. More...
 
static int notifyIOS (int id, List< Registrator.Item > items, String title, String text, String serverMessage, String notificationProfile, int badge) 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 (int id, List< Registrator.Item > items, String title, String text, String serverMessage, String notificationProfile, int badge) 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 APNS, GCM, ADM and WNS.

Member Function Documentation

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

Sends a push notification to every registered device.

static int DemoServer.PushNotificator.notifyAmazon ( int  id,
List< Registrator.Item >  items,
String  title,
String  text,
String  serverMessage,
String  notificationProfile,
int  badge 
) 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 ( int  id,
List< Registrator.Item >  items,
String  title,
String  text,
String  serverMessage,
String  notificationProfile,
int  badge 
) 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 ( int  id,
List< Registrator.Item >  items,
String  title,
String  text,
String  serverMessage,
String  notificationProfile,
int  badge 
) 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 ( int  id,
List< Registrator.Item >  items,
String  title,
String  text,
String  serverMessage,
String  notificationProfile,
int  badge 
) throws Throwable
static

Sends a push notification to every device in items list.

static int DemoServer.PushNotificator.notifyWindows ( int  id,
List< Registrator.Item >  items,
String  title,
String  text,
String  serverMessage,
String  notificationProfile,
int  badge 
) 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: