-
- All Implemented Interfaces:
public final class ApptentiveConfigurationThis class creates a new ApptentiveConfiguration object which is used to initialize the Apptentive SDK.
-
-
Field Summary
Fields Modifier and Type Field Description private BooleanshouldInheritAppThemeprivate LogLevellogLevelprivate BooleanshouldSanitizeLogMessagesprivate BooleanshouldEncryptStorageprivate LongratingInteractionThrottleLengthprivate StringcustomAppStoreURLprivate StringdistributionNameprivate StringdistributionVersionprivate final StringapptentiveKeyprivate final StringapptentiveSignature
-
Constructor Summary
Constructors Constructor Description ApptentiveConfiguration(String apptentiveKey, String apptentiveSignature)
-
Method Summary
Modifier and Type Method Description final BooleangetShouldInheritAppTheme()Determines if Apptentive Interactions will use the host app's theme or Apptentive's theme. final UnitsetShouldInheritAppTheme(Boolean shouldInheritAppTheme)Determines if Apptentive Interactions will use the host app's theme or Apptentive's theme. final LogLevelgetLogLevel()LogLevel is used to define what level of logs we will show in LogcatLogLevel.Verbose - Any relevant info not shown in other log LevelsLogLevel.Debug - Processes with more technical informationLogLevel.Info - General processes and non-technical resultsLogLevel.Warning - Non-breaking / handled issuesLogLevel.Error - Breaking / unhandled issues (Throwable) final UnitsetLogLevel(LogLevel logLevel)LogLevel is used to define what level of logs we will show in LogcatLogLevel.Verbose - Any relevant info not shown in other log LevelsLogLevel.Debug - Processes with more technical informationLogLevel.Info - General processes and non-technical resultsLogLevel.Warning - Non-breaking / handled issuesLogLevel.Error - Breaking / unhandled issues (Throwable) final BooleangetShouldSanitizeLogMessages()Redacts sensitive information from being logged when set to true.final UnitsetShouldSanitizeLogMessages(Boolean shouldSanitizeLogMessages)Redacts sensitive information from being logged when set to true.final BooleangetShouldEncryptStorage()Determines if the on-device storage should be encrypted. final UnitsetShouldEncryptStorage(Boolean shouldEncryptStorage)Determines if the on-device storage should be encrypted. final LonggetRatingInteractionThrottleLength()A time based throttle which determines when a rating interaction can be shown again. final UnitsetRatingInteractionThrottleLength(Long ratingInteractionThrottleLength)A time based throttle which determines when a rating interaction can be shown again. final StringgetCustomAppStoreURL()The URL that the user will be directed to using the Apptentive Rating Dialog. final UnitsetCustomAppStoreURL(String customAppStoreURL)The URL that the user will be directed to using the Apptentive Rating Dialog. final StringgetDistributionName()This field is intended for internal use only and should not be set by the app. final UnitsetDistributionName(String distributionName)This field is intended for internal use only and should not be set by the app. final StringgetDistributionVersion()This field is intended for internal use only and should not be set by the app. final UnitsetDistributionVersion(String distributionVersion)This field is intended for internal use only and should not be set by the app. final StringgetApptentiveKey()final StringgetApptentiveSignature()-
-
Constructor Detail
-
ApptentiveConfiguration
ApptentiveConfiguration(String apptentiveKey, String apptentiveSignature)
- Parameters:
apptentiveKey- The Apptentive Key that should be used when connecting to the Apptentive API.apptentiveSignature- The Apptentive Signature that should be used when connecting to the Apptentive API.
-
-
Method Detail
-
getShouldInheritAppTheme
final Boolean getShouldInheritAppTheme()
Determines if Apptentive Interactions will use the host app's theme or Apptentive's theme.
If
true, Apptentive Interactions will use the host app's theme and colors.If
false, Apptentive Interactions will use theTheme.Apptentivetheme and colors, set in thestyles.xmlfile within theapptentive-core-uipackage.ApptentiveThemeOverridewill always take priority over all themes. SeeThemeHelper.ktwithin theapptentive-core-uipackage for more info.
-
setShouldInheritAppTheme
final Unit setShouldInheritAppTheme(Boolean shouldInheritAppTheme)
Determines if Apptentive Interactions will use the host app's theme or Apptentive's theme.
If
true, Apptentive Interactions will use the host app's theme and colors.If
false, Apptentive Interactions will use theTheme.Apptentivetheme and colors, set in thestyles.xmlfile within theapptentive-core-uipackage.ApptentiveThemeOverridewill always take priority over all themes. SeeThemeHelper.ktwithin theapptentive-core-uipackage for more info.
-
getLogLevel
final LogLevel getLogLevel()
LogLevel is used to define what level of logs we will show in Logcat
LogLevel.Verbose - Any relevant info not shown in other log Levels
LogLevel.Debug - Processes with more technical information
LogLevel.Info - General processes and non-technical results
LogLevel.Warning - Non-breaking / handled issues
LogLevel.Error - Breaking / unhandled issues (Throwable)
-
setLogLevel
final Unit setLogLevel(LogLevel logLevel)
LogLevel is used to define what level of logs we will show in Logcat
LogLevel.Verbose - Any relevant info not shown in other log Levels
LogLevel.Debug - Processes with more technical information
LogLevel.Info - General processes and non-technical results
LogLevel.Warning - Non-breaking / handled issues
LogLevel.Error - Breaking / unhandled issues (Throwable)
-
getShouldSanitizeLogMessages
final Boolean getShouldSanitizeLogMessages()
Redacts sensitive information from being logged when set to
true.Data fields which have
@SensitiveDataKeyannotation will replace the logged data with Constants.REDACTED_DATA
-
setShouldSanitizeLogMessages
final Unit setShouldSanitizeLogMessages(Boolean shouldSanitizeLogMessages)
Redacts sensitive information from being logged when set to
true.Data fields which have
@SensitiveDataKeyannotation will replace the logged data with Constants.REDACTED_DATA
-
getShouldEncryptStorage
final Boolean getShouldEncryptStorage()
Determines if the on-device storage should be encrypted.
If
trueon-device storage of Apptentive SDK is encryptedIf
falseon-device storage of Apptentive SDK is not encryptedThe app can use this option if it is sending any sensitive information to Apptentive SDK through custom data
Check out the documentation here
-
setShouldEncryptStorage
final Unit setShouldEncryptStorage(Boolean shouldEncryptStorage)
Determines if the on-device storage should be encrypted.
If
trueon-device storage of Apptentive SDK is encryptedIf
falseon-device storage of Apptentive SDK is not encryptedThe app can use this option if it is sending any sensitive information to Apptentive SDK through custom data
Check out the documentation here
-
getRatingInteractionThrottleLength
final Long getRatingInteractionThrottleLength()
A time based throttle which determines when a rating interaction can be shown again. This is a safeguard on top of the criteria already set in the Apptentive Dashboard. This applies to both Google In-App Review & Apptentive Rating Dialog interactions.
Use TimeUnit for simple conversion utils
Example:
TimeUnit.DAYS.toMillis(30)
-
setRatingInteractionThrottleLength
final Unit setRatingInteractionThrottleLength(Long ratingInteractionThrottleLength)
A time based throttle which determines when a rating interaction can be shown again. This is a safeguard on top of the criteria already set in the Apptentive Dashboard. This applies to both Google In-App Review & Apptentive Rating Dialog interactions.
Use TimeUnit for simple conversion utils
Example:
TimeUnit.DAYS.toMillis(30)
-
getCustomAppStoreURL
final String getCustomAppStoreURL()
The URL that the user will be directed to using the Apptentive Rating Dialog.
The main purpose of this configuration is to support alternate app stores. By supplying your custom app store URL here, the user will be directed to the provided URL when prompted to rate your app.
DO NOT use if you wish to use Google In-App Review.
When
null(this is the default), the user will see the Google In-App Review and will be able to leave an app rating to the Play Store listing of the app.When set to a
StringURL, the SDK will ignore the Google In-App Review Interaction in favor of the Apptentive Rating Dialog Interaction, and will send the user to the specified URL if the user chooses to rate the app.Amazon App Store "Amazon Music" app example: Using package name - http://amazon.com/gp/mas/dl/android?p=com.amazon.mp3 Using ASIN - http://amazon.com/gp/mas/dl/android?asin=B004FRX0MY
-
setCustomAppStoreURL
final Unit setCustomAppStoreURL(String customAppStoreURL)
The URL that the user will be directed to using the Apptentive Rating Dialog.
The main purpose of this configuration is to support alternate app stores. By supplying your custom app store URL here, the user will be directed to the provided URL when prompted to rate your app.
DO NOT use if you wish to use Google In-App Review.
When
null(this is the default), the user will see the Google In-App Review and will be able to leave an app rating to the Play Store listing of the app.When set to a
StringURL, the SDK will ignore the Google In-App Review Interaction in favor of the Apptentive Rating Dialog Interaction, and will send the user to the specified URL if the user chooses to rate the app.Amazon App Store "Amazon Music" app example: Using package name - http://amazon.com/gp/mas/dl/android?p=com.amazon.mp3 Using ASIN - http://amazon.com/gp/mas/dl/android?asin=B004FRX0MY
-
getDistributionName
final String getDistributionName()
This field is intended for internal use only and should not be set by the app.
The distributionName field identifies the type of platform on which the SDK is distributed. By default, the value is set to "Default" for native SDKs.
However, this value will be overridden by plugins with their respective values. For instance, in the case of the mParticle plugin, the value should be set to "mParticle".
-
setDistributionName
final Unit setDistributionName(String distributionName)
This field is intended for internal use only and should not be set by the app.
The distributionName field identifies the type of platform on which the SDK is distributed. By default, the value is set to "Default" for native SDKs.
However, this value will be overridden by plugins with their respective values. For instance, in the case of the mParticle plugin, the value should be set to "mParticle".
-
getDistributionVersion
final String getDistributionVersion()
This field is intended for internal use only and should not be set by the app.
The distributionVersion field identifies the current version of the SDK. For native SDKs, the value is set to the current version of the SDK it is pointing at.
However, this value will be overridden by plugins with their respective values. For example, in the case of the mParticle plugin, the value should be set to the current version of the mParticle SDK
-
setDistributionVersion
final Unit setDistributionVersion(String distributionVersion)
This field is intended for internal use only and should not be set by the app.
The distributionVersion field identifies the current version of the SDK. For native SDKs, the value is set to the current version of the SDK it is pointing at.
However, this value will be overridden by plugins with their respective values. For example, in the case of the mParticle plugin, the value should be set to the current version of the mParticle SDK
-
getApptentiveKey
final String getApptentiveKey()
-
getApptentiveSignature
final String getApptentiveSignature()
-
-
-
-