public class Zaius
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Zaius.GoogleApiChecker |
Modifier and Type | Method and Description |
---|---|
void |
anonymize()
Anonymize (log out).
|
static Zaius |
getInstance() |
void |
pushOpened(android.os.Bundle bundle)
Signal to Zaius that push has been opened.
|
void |
pushOpened(RemoteMessage remoteMessage)
Signal to Zaius that push has been opened.
|
void |
sendAddToCart(java.lang.String productId,
int quantity)
Send an add to cart event, which is a kind of product event.
|
void |
sendDetail(java.lang.String productId)
Send a detail event, which is a kind of product event.
|
void |
sendEvent(ZaiusEvent event)
Queue the given event to be sent to its associated endpoint.
|
void |
sendRemoveFromCart(java.lang.String productId,
int quantity)
Send a remove from cart event, which is a kind of product event.
|
void |
setAdvertisingId(java.lang.String advertisingId)
Removes the previous advertising ID and sets a new one both here and in preferences.
|
void |
setCustomerId(java.lang.String customerId)
Set the customer ID.
|
static Zaius |
start(android.content.Context context,
java.lang.String trackerId,
java.lang.String applicationId,
ZaiusConfig config)
Initialize Zaius SDK for token / push activity tracking.
|
public static Zaius getInstance() throws ZaiusException
ZaiusException
public static Zaius start(android.content.Context context, java.lang.String trackerId, java.lang.String applicationId, ZaiusConfig config) throws ZaiusException
context
- application contexttrackerId
- Zaius tracker IDapplicationId
- app ID registered in Zaius Integrations pageconfig
- Zaius configuration, includes ZaiusEnvironment
(ZaiusEnvironment.PRODUCTION unless account lives elsewhere)ZaiusException
- if invalid parameters passed inpublic void anonymize()
public void sendAddToCart(java.lang.String productId, int quantity)
productId
- The product IDquantity
- The quantity added to the cartpublic void sendDetail(java.lang.String productId)
productId
- The product IDpublic void sendRemoveFromCart(java.lang.String productId, int quantity)
productId
- The product IDquantity
- The quantity removed from the cartpublic void sendEvent(ZaiusEvent event) throws ZaiusException
event
- the eventZaiusException
public void setCustomerId(java.lang.String customerId) throws ZaiusException
customerId
- client customer ID (null if disassociating previous customer ID from this
app installation)ZaiusException
public void setAdvertisingId(java.lang.String advertisingId)
advertisingId
- the new advertising IDpublic void pushOpened(android.os.Bundle bundle) throws ZaiusException
bundle
- notification bundleZaiusException
public void pushOpened(RemoteMessage remoteMessage) throws ZaiusException
remoteMessage
- the message returned from FCMZaiusException
- missing key or key points to empty string