class Teak
Teak.
Static Attributes
Name | Type | Description |
---|---|---|
|
The default id Teak uses for |
|
|
The push notifications permission identifier. |
|
|
Version of the Teak SDK. |
|
|
Version of the Teak SDK, and Unity/Cocos2dx SDK if applicable. |
|
|
Version of the Teak SDK, as an array [major, minor, revision]. |
|
|
Force debug print on/off. |
|
|
Value provided to |
|
|
Value provided to |
|
|
Value provided to |
|
|
Notifications are enabled. |
|
|
Notifications are disabled. |
|
|
Notification status is not known. |
Static Methods
onCreate
Initialize Teak and tell it to listen to the lifecycle events of Activity
.
void io.teak.sdk.Teak.onCreate(@NonNull Activity activity);
Call this function from the Activity#onCreate
function of your Activity
before the call to super.onCreate()
identifyUser
Use |
Tell Teak how it should identify the current user.
void io.teak.sdk.Teak.identifyUser(final String userIdentifier);
This will also begin tracking and reporting of a session, and track a daily active user.
This should be the same way you identify the user in your backend. |
identifyUser
Use |
Tell Teak how it should identify the current user.
void io.teak.sdk.Teak.identifyUser(final String userIdentifier,
final String email);
This will also begin tracking and reporting of a session, and track a daily active user.
This should be the same way you identify the user in your backend. |
identifyUser
Use |
Tell Teak how it should identify the current user, with data collection opt-out.
void io.teak.sdk.Teak.identifyUser(final String userIdentifier,
final String[] optOut);
This will also begin tracking and reporting of a session, and track a daily active user.
This should be the same way you identify the user in your backend. |
identifyUser
Use |
Tell Teak how it should identify the current user, with data collection opt-out and email.
void io.teak.sdk.Teak.identifyUser(final String userIdentifier,
final String[] optOut,
final String email);
This will also begin tracking and reporting of a session, and track a daily active user.
This should be the same way you identify the user in your backend. |
identifyUser
Tell Teak how it should identify the current user, with additional options and configuration.
void io.teak.sdk.Teak.identifyUser(final String userIdentifier,
final UserConfiguration userConfiguration);
This will also begin tracking and reporting of a session, and track a daily active user.
This should be the same way you identify the user in your backend. |
deleteEmail
Delete any email address associated with the current user.
void io.teak.sdk.Teak.deleteEmail();
setChannelState
Set the state of a Teak Marketing Channel.
Future<Channel.Reply> io.teak.sdk.Teak.setChannelState(final Channel.Type channel,
final Channel.State state);
You may only assign the values |
setCategoryState
Set the state of a Teak Marketing Channel Category.
Future<Channel.Reply> io.teak.sdk.Teak.setCategoryState(final Channel.Type channel,
final String category,
final Channel.State state);
You may only assign the values |
trackEvent
Track an arbitrary event in Teak.
void io.teak.sdk.Teak.trackEvent(final String actionId,
final String objectTypeId,
final String objectInstanceId);
incrementEvent
Increment the value an arbitrary event in Teak.
void io.teak.sdk.Teak.incrementEvent(final String actionId,
final String objectTypeId,
final String objectInstanceId,
final long count);
getNotificationStatus
Has the user disabled notifications for this app.
int io.teak.sdk.Teak.getNotificationStatus();
canOpenSettingsAppToThisAppsSettings
Determine if Teak can open the settings app to the settings for this app.
boolean io.teak.sdk.Teak.canOpenSettingsAppToThisAppsSettings();
openSettingsAppToThisAppsSettings
Open the settings app to the settings for this app.
boolean io.teak.sdk.Teak.openSettingsAppToThisAppsSettings();
canOpenNotificationSettings
Determine if the current device is able to open directly to the notificaton settings for this app.
boolean io.teak.sdk.Teak.canOpenNotificationSettings();
openNotificationSettings
Open the settings app to the notification settings for this app.
boolean io.teak.sdk.Teak.openNotificationSettings();
openNotificationSettings
Open the settings app to the notification settings for this app.
boolean io.teak.sdk.Teak.openNotificationSettings(String channelId);
setApplicationBadgeNumber
Set the badge number on the icon of the application.
boolean io.teak.sdk.Teak.setApplicationBadgeNumber(int count);
setNumericAttribute
Track a numeric player profile attribute.
void io.teak.sdk.Teak.setNumericAttribute(final String attributeName,
final double attributeValue);
setStringAttribute
Track a string player profile attribute.
void io.teak.sdk.Teak.setStringAttribute(final String attributeName,
final String attributeValue);
getDeviceConfiguration
Get Teak’s configuration data about the current device.
String io.teak.sdk.Teak.getDeviceConfiguration();
getAppConfiguration
Get Teak’s configuration data about the current app.
String io.teak.sdk.Teak.getAppConfiguration();
registerDeepLink
Register a deep link route with Teak.
void io.teak.sdk.Teak.registerDeepLink(@NonNull String route,
@NonNull String name,
@NonNull String description,
@NonNull Teak.DeepLink call);
setLogListener
Listen for Teak SDK log events.
void io.teak.sdk.Teak.setLogListener(LogListener logListener);
processDeepLinks
Logging.
void io.teak.sdk.Teak.processDeepLinks();
Indicate that your app is ready for deep links.Deep links will not be processed sooner than the earliest of:
-
identifyUser(String, UserConfiguration)
is called -
This method is called
handleDeepLinkPath
Manually pass Teak a deep link path to handle.
boolean io.teak.sdk.Teak.handleDeepLinkPath(final String path);
Return
true if the deep link was found and handled.
This path should be prefixed with a forward slash, and can contain query parameters, e.g. /foo/bar?fizz=buzz It should not contain a host, or a scheme.This function will only execute deep links that have been defined through Teak. It has no visibility into any other SDKs or custom code.