UTNotifications  1.7
Professional Local & Push Notification Plugin
Static Public Member Functions | List of all members
com.universal_tools.demoserver.PushNotificator Class Reference

The sample class showing how you can send push notifications for different "providers", such as APNS, FCM, 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 notifyFCM (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 featured Android devices. More...
 
static int notifyADM (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 notifyAPNS (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 (its source code is provided). More...
 
static int notifyWNS (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, FCM, ADM and WNS.

Member Function Documentation

◆ notifyADM()

static int com.universal_tools.demoserver.PushNotificator.notifyADM ( 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.

See also: https://developer.amazon.com/public/apis/engage/device-messaging/tech-docs/06-sending-a-message

◆ notifyAll()

static int com.universal_tools.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.

◆ notifyAPNS()

static int com.universal_tools.demoserver.PushNotificator.notifyAPNS ( 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 (its source code is provided).

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

See also
UTNotifications.Manager.OnSendRegistrationId

See also: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html.

◆ notifyFCM()

static int com.universal_tools.demoserver.PushNotificator.notifyFCM ( 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 featured Android devices.

See also: https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream

◆ notifyItems()

static int com.universal_tools.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.

◆ notifyWNS()

static int com.universal_tools.demoserver.PushNotificator.notifyWNS ( 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: See also: https://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx


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