class Teak
Teak.
Static Attributes
Name | Type | Description |
---|---|---|
|
The default id Teak uses for android.app.job.JobInfo. |
|
|
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 identifyUser(String, String[]) to opt out of collecting an IDFA for this specific user. |
|
|
Value provided to identifyUser(String, String[]) to opt out of collecting a Facebook Access Token for this specific user. |
|
|
Value provided to identifyUser(String, String[]) to opt out of collecting a Push Key for this specific user. |
|
|
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 onCreate(@NonNull Activity activity);
Call this function from the Activity#onCreate function of your Activity
before the call to super.onCreate()
identifyUser
Use Teak#identifyUser(String, UserConfiguration) instead. |
Tell Teak how it should identify the current user.
void 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 Teak#identifyUser(String, UserConfiguration) instead. |
Tell Teak how it should identify the current user.
void 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 Teak#identifyUser(String, UserConfiguration) instead. |
Tell Teak how it should identify the current user, with data collection opt-out.
void 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. |
Parameters
Name | Description |
---|---|
|
An identifier which is unique for the current user. |
|
A list containing zero or more of: OPT_OUT_IDFA, OPT_OUT_FACEBOOK, OPT_OUT_PUSH_KEY |
identifyUser
Use Teak#identifyUser(String, UserConfiguration) instead. |
Tell Teak how it should identify the current user, with data collection opt-out and email.
void 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. |
Parameters
Name | Description |
---|---|
|
An identifier which is unique for the current user. |
|
A list containing zero or more of: OPT_OUT_IDFA, OPT_OUT_FACEBOOK, OPT_OUT_PUSH_KEY |
|
The email address for the user. |
identifyUser
Tell Teak how it should identify the current user, with additional options and configuration.
void 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. |
setChannelState
Set the state of a Teak Marketing Channel.
Future<Channel.Reply> setChannelState(final Channel.Type channel,
final Channel.State state);
You may only assign the values Teak.Channel.State#OptOut and Teak.Channel.State#Available to Push Channels; Channel.State#OptIn is not allowed. |
setCategoryState
Set the state of a Teak Marketing Channel Category.
Future<Channel.Reply> setCategoryState(final Channel.Type channel,
final String category,
final Channel.State state);
You may only assign the values Channel.State#OptOut and Channel.State#Available. |
trackEvent
Track an arbitrary event in Teak.
void trackEvent(final String actionId,
final String objectTypeId,
final String objectInstanceId);
incrementEvent
Increment the value an arbitrary event in Teak.
void incrementEvent(final String actionId,
final String objectTypeId,
final String objectInstanceId,
final long count);
getNotificationStatus
Has the user disabled notifications for this app.
int getNotificationStatus();
canOpenSettingsAppToThisAppsSettings
Determine if Teak can open the settings app to the settings for this app.
boolean canOpenSettingsAppToThisAppsSettings();
openSettingsAppToThisAppsSettings
Open the settings app to the settings for this app.
boolean openSettingsAppToThisAppsSettings();
canOpenNotificationSettings
Determine if the current device is able to open directly to the notificaton settings for this app.
boolean canOpenNotificationSettings();
openNotificationSettings
Open the settings app to the notification settings for this app.
boolean openNotificationSettings();
openNotificationSettings
Open the settings app to the notification settings for this app.
boolean openNotificationSettings(String channelId);
setApplicationBadgeNumber
Set the badge number on the icon of the application.
boolean setApplicationBadgeNumber(int count);
setNumericAttribute
Track a numeric player profile attribute.
void setNumericAttribute(final String attributeName,
final double attributeValue);
setStringAttribute
Track a string player profile attribute.
void setStringAttribute(final String attributeName,
final String attributeValue);
getDeviceConfiguration
Get Teak’s configuration data about the current device.
String getDeviceConfiguration();
getAppConfiguration
Get Teak’s configuration data about the current app.
String getAppConfiguration();
registerDeepLink
Register a deep link route with Teak.
void registerDeepLink(@NonNull String route,
@NonNull String name,
@NonNull String description,
@NonNull Teak.DeepLink call);
processDeepLinks
Logging.
void 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 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.