You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Import touchpointkit-release.aar file as a module in your project and add the implementation project(path: ':touchpointkit-release') in build.gradle file. Add following dependencies in build.gradle file.
<string name="api_key">API_KEY</string>
<string name="api_secret">API_SECRET</string>
<string name="pod_name">DEV2</string> <!--POD_NAME value must be any of: NA1, NA2, EU1, EU2, AP2, DEV1, DEV2, SIT1, PUB -->
<bool name="disable_api_filter">true</bool> <!--This is optional. Default is false-->
<bool name="enable_debug_logs">true</bool> <!--This is optional. Default is false-->
<bool name="disable_all_logs">false</bool> <!--This is optional. Default is false-->
<bool name="disable_caching">false</bool> <!--This is optional. Default is false-->
Import TouchPoint SDK import com.visioncritical.touchpointkit.utils.TouchPointActivity & add following code snippet on Activity's onCreate function:
In Activity, Import TouchPoint SDK import com.visioncritical.touchpointkit.utils.TouchPointActivity & set the screen name using following code snippet:
This will lookup for any banner for current screen ( SCREEN_NAME) and display the banner automatically. If you want to open TouchPoint activity directly, you can directly call the following method:
TouchPointActivityInterface is required if you want the callback when the TouchPointActivity completed. Otherwise you can pass null in interface. Following is the TouchPointActivityInterface delegate method.
// Kotlin
override fun onTouchPointActivityFinished() {
// Calls when TouchPoint activity is completed.
}
// Java
@Override void onTouchPointActivityFinished() {
// Calls when TouchPoint activity is completed.
}
Before calling openActivityForScreen function, you can check if TouchPoint activity need to be shown or not using following method:
// Kotlin
if (TouchPointActivity.shared.shouldShowActivity(SCREEN_NAME)) {
// Call openActivity function of TouchPointActivity
}
// Java
TouchPointActivity.Companion.getShared().shouldShowActivity(SCREEN_NAME)) {
// Call openActivity function of TouchPointActivity
}