Modules

Client

Module responsible for all operations connected with a client.

Declared In

com.synerise.sdk.client.Client

Declaration

public abstract class Client

Properties

There are no properties.

Initializers

There are no initializers.

Methods

Sign in a client in order to obtain the JWT token, which can be used in subsequent requests. (Click for more details)

public static IApiCall signIn(@NonNull String email, @NonNull String password)


Sign out a client and clear the token. (Click for more details)

public static void signOut()


Sign in with Facebook, Google, or OAuth. (Click for more details)

public static void authenticate(token, provider, agreements, attributes, authId)


@Deprecated method Sign in with Facebook. (Click for more details)

public static IApiCall authenticateByFacebook(@NonNull String facebookToken, @Nullable Agreements agreements, @Nullable Attributes attributes, @Nullable String authId)


Sign in with an already registered Facebook account. (Click for more details)

public static IApiCall authenticateByFacebookIfRegistered(@NonNull String facebookToken, @Nullable String authId)


@Deprecated method Sign in with OAuth. (Click for more details)

public static IApiCall authenticateByOAuth(@NonNull String accessToken, @Nullable Agreements agreements, @Nullable Attributes attributes, @Nullable String authId)


Sign in with an already registered OAuth account. (Click for more details)

public static IApiCall authenticateByOAuthIfRegistered(@NonNull String accessToken, @Nullable String authId)


Destroy a session. (Click for more details)

public static void destroySession()


Register a new client with email, password, and optional data. (Click for more details)

public static IApiCall registerAccount(@NonNull RegisterClient registerClient)


Activate a client with email. (Click for more details)

public static IApiCall activateAccount(String email)


Confirm a client’s account with a token. (Click for more details)

public static IApiCall confirmAccount(String token)


Request a client’s password reset with email. (Click for more details)

public static IApiCall requestPasswordReset(@NonNull PasswordResetRequest resetRequest)


Confirm a client’s password reset with a new password and token provided by requestPasswordReset (Click for more details)

public static IApiCall confirmPasswordReset(@NonNull PasswordResetConfirmation resetConfirmation)


Get a client’s account information. (Click for more details)

public static IDataApiCall<GetAccountInformation> getAccount()


Update a client’s account information with optional data. (Click for more details)

public static IApiCall updateAccount(@NonNull UpdateAccountInformation accountInformation)


Request an email change. (Click for more details)

public static IApiCall requestEmailChangeByFacebook(String email, @Nullable String uuid)


Delete an account by Facebook. (Click for more details)

public static IApiCall deleteAccountByFacebook(String facebookToken, @Nullable String uuid)


Delete an account by OAuth. (Click for more details)

public static IApiCall deleteAccountByOAuth(String accessToken, @Nullable String uuid)


Delete a client’s account. (Click for more details)

public static IApiCall deleteAccount(String clientAuthFactor, ClientIdentityProvider clientIdentityProvider, @Nullable String authId)


Request a phone number update. This action requires additional validation with a PIN code. (Click for more details)

public static IApiCall requestPhoneUpdate(String phone)


Confirm a phone number update. (Click for more details)

public static IApiCall confirmPhoneUpdate(String phone, String confirmationCode, @Nullable Boolean smsAgreement)


Request an email change. (Click for more details)

public static IApiCall requestEmailChange(String email, String password, @Nullable String uuid)


Confirm an email change. (Click for more details)

public static IApiCall confirmEmailChange(String token, boolean newsletterAgreement)


Change a client’s password. (Click for more details)

public static IApiCall changePassword(@NonNull String oldPassword, @NonNull String password)


Get JWT login token. (Click for more details)

public static IDataApiCall<Token> getToken()
	[(Click for more details)](/developers/android-sdk/method-reference/client-session/#get-customer-token)


Refresh JWT token. (Click for more details)

public static IApiCall refreshToken()


Regenerate UUID and clear the authentication token. (Click for more details)

public static boolean regenerateUuid()


Regenerate UUID and clear the authentication token, login (if applicable), custom email, and custom identifier. (Click for more details)

public static boolean regenerateUuid(String clientIdentifier)


Change API Key dynamically. (Click for more details)

public static void changeApiKey(@NonNull String apiKey)


Retrieve current customer UUID. (Click for more details)

public static String getUuid()


Retrieve events for the authenticated client. (Click for more details)

public static IDataApiCall<List<ClientEventData>> getEvents(ClientEventsQuery clientEventsQuery)


Check if a client is signed in (the customer’s token is authorized). (Click for more details)

public static boolean isSignedIn()


Register for push notifications. (Click for more details)

public static IApiCall registerForPush(@NonNull String firebaseId, boolean mobilePushAgreement)


Set your own ClientStateChangeListener to get optional callbacks. (Click for more details)

public static void setOnClientStateChangeListener(OnClientStateChangeListener listener)


Remove your own ClientStateChangeListener. (Click for more details)

public static void removeClientStateChangeListener()



Content

Module responsible for managing documents, reccommendations and content widget.

Declared In

com.synerise.sdk.content.Content

Declaration

public abstract class Content

Properties

There are no properties.

Initializers

There are no initializers.

Methods

Method that returns a list of recommendations assigned to a slug. (Click for more details)

public static IDataApiCall<RecommendationResponse> getRecommendations(String slugName, RecommendationRequestBody options)


Method that generates the document assigned to a slug. (Click for more details)

public static IDataApiCall<Object> getDocument(String slugName)


Method that generates all documents assigned to a schema. (Click for more details)

public static IDataApiCall<List<Object>> getDocuments(DocumentsApiQuery documentsApiQuery)



Promotions

Module responsible for managing promotions.

Declared In

com.synerise.sdk.promotions.Promotions

Declaration

public abstract class Promotions

Properties

There are no properties.

Initializers

There are no initializers.

Methods

Use this method to get all possible combinations of promotions, which are defined for this customer. (Click for more details)

public static IDataApiCall<PromotionResponse> getPromotions()


Use this method to get all possible combinations of promotions, which are defined for this customer. In PromotionsApiQuery you can define sortKeys and filters. (Click for more details)

public static IDataApiCall<PromotionResponse> getPromotions(PromotionsApiQuery promotionsApiQuery)


Use this method to get promotion. (Click for more details)

public static IDataApiCall<SinglePromotionResponse> getPromotionByUuid(@NonNull String uuid)


Use this method to get promotion. (Click for more details)

public static IDataApiCall<SinglePromotionResponse> getPromotionByCode(@NonNull String code)


Use this method to activate promotion that has uuid passed as parameter. (Click for more details)

public static IApiCall activatePromotionByUuid(@NonNull String uuid)


Use this method to activate promotion with code passed as parameter. (Click for more details)

public static IApiCall activatePromotionByCode(@NonNull String code)


Use this method to deactivate promotion that has uuid passed as parameter. (Click for more details)

public static IApiCall deactivatePromotionByUuid(@NonNull String uuid)


Use this method to deactivate promotion with code passed as parameter. (Click for more details)

public static IApiCall deactivatePromotionByCode(@NonNull String code)


Use this method to get voucher code only once or assign voucher with provided pool uuid for the client. (Click for more details)

public static IDataApiCall<AssignVoucherResponse> getOrAssignVoucher(@NonNull String poolUuid)


Use this method to assign voucher with provided pool uuid for the client. (Click for more details)

public static IDataApiCall<AssignVoucherResponse> assignVoucherCode(@NonNull String poolUuid)


Use this method to get client’s voucher codes. (Click for more details)

public static IDataApiCall<VoucherCodesResponse> getAssignedVoucherCodes()



Injector

Module responsible for handling push notifications.

Declared In

com.synerise.sdk.injector.Injector

Declaration

public abstract class Injector

Properties

There are no properties.

Initializers

There are no initializers.

Methods

This method handles new push message and starts activity, which build proper views from provided data. (Click for more details)

public static boolean handlePushPayload(Bundle bundle)
public static boolean handlePushPayload(Map<String, String> pushPayload)


This method decrypts push payload. (Click for more details)

public static Map<String, String> decryptPushPayload(Map<String, String> pushPayload) throws DecryptionException


This method only checks whether provided push data is encrypted by Synerise. (Click for more details)

public static boolean isPushEncrypted(Map<String, String> pushPayload)


This method only checks whether provided push data comes from Synerise. (Click for more details)

public static boolean isSynerisePush(Map<String, String> pushPayload)


This method only checks whether provided push data comes from Synerise and is it specifically Synerise Silent Command. (Click for more details)

public static boolean isSilentCommand(Map<String, String> pushPayload)


This method only checks whether provided push data comes from Synerise and is it specifically Synerise Silent Sdk Command. (Click for more details)

public static boolean isSilentCommandSdk(Map<String, String> pushPayload)


This method only checks whether provided push data comes from Synerise and is it specifically Synerise Simple Push. (Click for more details)

public static boolean isSyneriseSimplePush(Map<String, String> pushPayload)


This method only checks whether provided push data comes from Synerise and is it specifically Synerise Banner. (Click for more details)

public static boolean isSyneriseBanner(Map<String, String> pushPayload)


Method that converts push payload into SilentCommand object. (Click for more details)

public static SilentCommand getSilentCommand(Map<String, String> payload) throws ValidationException


Cancels previous API request (if any) and then starts loading Walkthrough asynchronously. (Click for more details)

public static void getWalkthrough()


Shows Walkthrough if one is loaded (with higher priority) or already cached. (Click for more details)

public static boolean showWalkthrough()


This method returns true if Walkthrough is already loaded, false otherwise. (Click for more details)

public static boolean isWalkthroughLoaded()


This method verifies whether loaded Walkthrough is different than previously presented. (Click for more details)

public static boolean isLoadedWalkthroughUnique()


Set your own Walkthrough listener to receive optional callbacks. (Click for more details)

public static void setOnWalkthroughListener(OnWalkthroughListener listener)


Set your own Walkthrough listener to receive optional callbacks. (Click for more details)

public static void removeWalkthroughListener()


Cancels previous API request (if any) and then starts fetching available. (Click for more details)

public static void fetchBanners()
public static void fetchBanners(@NonNull final DataActionListener<List<TemplateBanner>> successListener,
                                    @NonNull final DataActionListener<ApiError> errorListener)


This method provides valid banners directly from SDK cache. (Click for more details)

public static List<TemplateBanner> getBanners()


Show banner immediately with no check. (Click for more details)

public static void showBanner(TemplateBanner banner, boolean markPresented)


Set your own banner listener to receive optional callbacks. (Click for more details)

public static void setOnBannerListener(OnBannerListener listener)


Remove banner listener to stop receiving callbacks. (Click for more details)

public static void removeBannerListener()


Get all available simple and silent pushes for this client. (Click for more details)

public static IDataApiCall<List<SynerisePushResponse>> getPushes()



Tracker

Module responsible for sending events.

Declared In

com.synerise.sdk.event.Tracker

Declaration

public abstract class Tracker

Properties

There are no properties.

Initializers

There are no initializers.

Methods

Your custom identifier will be sent within every event in event params. (Click for more details)

public static void setCustomIdentifier(String customIdentifier)


Your custom email will be sent within every event in event params. (Click for more details)

public static void setCustomEmail(String customEmail)


Send method adds new event to queue and sends available events to server if possible. (Click for more details)

public static void send(Event event)


Flush method forces sending events from queue to server. (Click for more details)

public static void flush()



Settings

Class model for settings.

Declared In

com.synerise.sdk.core.settings.Settings

Declaration

public class Settings

Properties

Property Type Optional Default Description
tracker TrackerSettings no - Tracker settings class
sdk GeneralSettings no - Main sdk settings class
notifications NotificationSettings no - Notifications settings class
injector InjectorSettings no - Injector settings class

Initializers

There are no initializers.

Methods

Get instance method.

public static Settings getInstance()


Synerise main class

Main Synerise module responsible for whole sdk. This class is responsible for initializatioon of sdk.

Declared In

com.synerise.sdk.core.Synerise

Declaration

public class Synerise

Properties

Property Type Optional Default Description
settings Settings no - Configuration of whole sdk

Initializers

There is a builder.

Methods

Method to get applicationContext.

public static Context getApplicationContext()


Method that generates the document assigned to a slug.

public static String getClientApiKey()


Get application id.

public static String getAppId()


Get base url.

public static String getBaseUrl()


Get flag indicating debugMode state.

public static boolean getSyneriseDebugMode()



😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker