|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.netmera.mobile.NetmeraPushSender
public class NetmeraPushSender
This class will help you when you want to send push notifications. After
creating a NetmeraPushObject
, you can use this class to send the
notification.
Constructor Summary | |
---|---|
NetmeraPushSender()
|
Method Summary | |
---|---|
static void |
addTag(java.lang.String tag)
Add a tag to push notification. |
java.util.List<java.lang.String> |
getTags()
Get tags of incoming push notification. |
static void |
sendPushNotification(NetmeraPushObject push)
Sends given push notification message to specified users. |
static void |
sendPushNotificationInBackground(NetmeraPushObject push)
Sends given push notification message to specified users in background. |
static void |
sendPushNotificationInBackground(NetmeraPushObject push,
NetmeraCallback<java.lang.Void> callback)
Sends given push notification message to specified users in background. |
static void |
setBoxPush(NetmeraGeoLocation firstPoint,
NetmeraGeoLocation secondPoint)
Creates box using the given two location (latitude,longitude) data in order to send push notifications to devices registered inside that box. |
static void |
setCirclePush(NetmeraGeoLocation startLocation,
double distance)
Creates a circle by taking given location as a base and the distance as the radius in order to send push notifications to devices registered inside that circle. |
static void |
setSendToAndroid(boolean sendToAndroid)
If you want to send the push notification to Android devices, set it using this method. |
static void |
setSendToIOS(boolean sendToIOS)
If you want to send the push notification to iOS devices, set it using this method. |
static void |
setTags(java.util.List<java.lang.String> tags)
Set tag list when sending push notification. |
static void |
whereCustomFieldEqual(java.lang.String key,
java.lang.Object value)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetmeraPushSender()
Method Detail |
---|
public static void setCirclePush(NetmeraGeoLocation startLocation, double distance)
startLocation
- base location to search near it.distance
- is used to create circle by taking the startLocation as a
center.public static void setBoxPush(NetmeraGeoLocation firstPoint, NetmeraGeoLocation secondPoint)
firstPoint
- NetmeraGeoLocation
objectsecondPoint
- NetmeraGeoLocation
objectpublic static void whereCustomFieldEqual(java.lang.String key, java.lang.Object value)
public static void setSendToAndroid(boolean sendToAndroid)
sendToAndroid
- set true if you want to send, else falsepublic static void setSendToIOS(boolean sendToIOS)
sendToIOS
- set true if you want to send, else falsepublic static void setTags(java.util.List<java.lang.String> tags)
tags
- public static void addTag(java.lang.String tag)
tag
- public java.util.List<java.lang.String> getTags()
public static void sendPushNotificationInBackground(NetmeraPushObject push, NetmeraCallback<java.lang.Void> callback)
push
- notification to sendcallback
- - NetmeraCallback.onFail(NetmeraException)
or
NetmeraCallback.onSuccess(Object)
methods called when
send operation finishes. Falls onFail method if the given push
notification is null, if the message in the notification is
null, if there is no channel defined or there is a problem
with internet connection.public static void sendPushNotificationInBackground(NetmeraPushObject push)
push
- notification to sendpublic static void sendPushNotification(NetmeraPushObject push) throws NetmeraException
push
- notification to send
NetmeraException
- if the given push notification is null, if the message in the
notification is null, if there is no channel defined or there
is a problem with internet connection.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |