public final class EpiSdk
extends java.lang.Object
Constructor and Description |
---|
EpiSdk() |
Modifier and Type | Method and Description |
---|---|
static void |
acceptNotifications(android.content.Context context,
boolean accept)
This method enables or disables the push notifications from Campaign for the recipient.
|
static java.lang.String |
getSdkVersion()
This method returns the version number of the SDK.
|
static void |
init(android.content.Context applicationContext,
java.lang.String authenticationToken)
This method initialises the SDK by registering the client towards the Episerver push API.
|
static void |
initWithRecipientId(android.content.Context applicationContext,
java.lang.String authenticationToken,
java.lang.String recipientIdValue)
Same as
init(android.content.Context, java.lang.String) but this method additionally specifies
the recipient ID value if the id column in the recipient list is NOT the push recipient token. |
static void |
trackOpen(android.content.Context context,
PushMessage message)
This method calls the Episerver Campaign tracking URL contained in a
PushMessage . |
static void |
trackOpen(android.content.Context context,
java.lang.String trackingUrl)
This method calls a custom tracking URL to track an action.
|
static boolean |
updateRecipientData(android.content.Context context,
java.util.Map<java.lang.String,java.lang.String> recipientData)
This method adds additional recipient data which are then sent to the server.
|
public static void init(android.content.Context applicationContext, java.lang.String authenticationToken)
initWithRecipientId(android.content.Context, java.lang.String, java.lang.String)
instead.applicationContext
- Application contextauthenticationToken
- Episerver authentication token which is used to authenticate this
client in the Episerver push API. To get this token, contact the Episerver support
by email: support@episerver.com or phone: +49(0)30-76 80 78 405public static void initWithRecipientId(android.content.Context applicationContext, java.lang.String authenticationToken, java.lang.String recipientIdValue)
init(android.content.Context, java.lang.String)
but this method additionally specifies
the recipient ID value if the id column in the recipient list is NOT the push recipient token.applicationContext
- Application contextauthenticationToken
- Episerver authentication token which is used to authenticate this
client in the Episerver push API. To get this token, contact the Episerver support
by email: support@episerver.com or phone: +49(0)30-76 80 78 405recipientIdValue
- The recipient ID value that is not the push recipient tokenpublic static boolean updateRecipientData(android.content.Context context, java.util.Map<java.lang.String,java.lang.String> recipientData)
This method adds additional recipient data which are then sent to the server.
If the SDK has already been initialised (see init(android.content.Context, java.lang.String)
) and a new value is passed,
the init method is invoked again with the new value and the old values
are overwritten.
recipientData
- New recipient data as key-value pairs. The keys must not contain the character #
.public static void trackOpen(android.content.Context context, java.lang.String trackingUrl)
context
- Application contexttrackingUrl
- URL to be calledpublic static void trackOpen(android.content.Context context, PushMessage message)
PushMessage
.context
- Application contextmessage
- Message containing the URL to be trackedpublic static java.lang.String getSdkVersion()
public static void acceptNotifications(android.content.Context context, boolean accept)
context
- Application contextaccept
- Accept push notifications (true/false)