java.lang.Object | |
↳ | com.apptimize.ApptimizeOptions |
Configurable options when making calls to run Apptimize tests.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | ApptimizeOptions.LogLevel |
When used as an argument to
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ApptimizeOptions() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ApptimizeOptions |
disableVisualChangesAndThirdPartyEventImport()
Helper function to turn off visual changes (e.g. | ||||||||||
boolean | doesForceVariantsShowWinnersAndInstantUpdates() | ||||||||||
String | getDeviceName() | ||||||||||
ApptimizeOptions.LogLevel | getLogLevel() | ||||||||||
Long | getUpdateMetaDataTimeout() | ||||||||||
boolean | isDeveloperModeDisabled() | ||||||||||
boolean | isExplicitEnablingRequired() | ||||||||||
boolean | isMultiprocessModeEnabled() | ||||||||||
boolean | isPerformanceLoggingEnabled() | ||||||||||
boolean | isRefreshingMetadataOnSetup() | ||||||||||
boolean | isSetupInBackground() | ||||||||||
boolean | isThirdPartyEventExportingEnabled() | ||||||||||
boolean | isThirdPartyEventImportingEnabled() | ||||||||||
boolean | isVisualChangesEnabled() | ||||||||||
ApptimizeOptions |
setDeveloperModeDisabled(boolean developerModeDisabled)
A device in developer mode can be connected to the Apptimize dashboard in order to create visual variants and metrics or try out different variants in real-time. | ||||||||||
ApptimizeOptions |
setDeviceName(String deviceName)
Set the name of the device which will appear when connecting to the Visual Apptimizer. | ||||||||||
ApptimizeOptions |
setExplicitEnablingRequired(boolean explicitEnablingRequired)
By default, this is set to false, in which case visual variants and metrics (which can be setup through the Visual Apptimizer) are allowed on any android.app.Activity. | ||||||||||
ApptimizeOptions |
setForceVariantsShowWinnersAndInstantUpdates(boolean showWinnersAndInstantUpdates)
Controls the display of winners and instant updates while forced variables are active. | ||||||||||
ApptimizeOptions |
setIsRefreshingMetadataOnSetup(boolean refreshMetadataOnSetup)
Normally Apptimize will use cached metadata on setup and only checks for metadata after a certain amount of time has passed since this last check. | ||||||||||
ApptimizeOptions |
setLogLevel(ApptimizeOptions.LogLevel logLevel)
Allows you to tune Apptimize's log level. | ||||||||||
ApptimizeOptions |
setMultiprocessMode(boolean multiprocessMode)
Allows Apptimize to run in every process of an app with multiple processes. | ||||||||||
ApptimizeOptions |
setPerformanceLoggingEnabled(boolean enabled)
Turns on performance logging for Apptimize. | ||||||||||
ApptimizeOptions |
setThirdPartyEventExportingEnabled(boolean enabled)
Allows Apptimize to export events to 3rd party analytics services. | ||||||||||
ApptimizeOptions |
setThirdPartyEventImportingEnabled(boolean enabled)
Allows Apptimize to import 3rd party analytics events. | ||||||||||
ApptimizeOptions |
setUpdateMetadataTimeout(long updateMetadataTimeout)
Setting this option indicates to Apptimize that it is okay to wait for the specified amount of time to receive the first metadata update. | ||||||||||
ApptimizeOptions |
setVisualChangesEnabled(boolean enabled)
Allows Apptimize for visual changes (e.g. | ||||||||||
ApptimizeOptions |
setupInBackground(boolean setupInBackground)
Apptimize.setup() should normally be called and run on the main thread, to ensure that all of the Apptimize functionality is available immediately. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Helper function to turn off visual changes (e.g. hotfixes and visual experiments) and automatic third-party event imports.
Also seesetVisualChangesEnabled(boolean)
and setThirdPartyEventImportingEnabled(boolean)
ApptimizeOptions
object
A device in developer mode can be connected to the Apptimize dashboard in order to create visual variants and metrics or try out different variants in real-time.
By default, Apptimize will put a device into developer mode if the app is debug-signed. Setting this option to true will override this behavior, causing the device to never connect to the Apptimize dashboard.
developerModeDisabled | Whether developer mode should be disabled |
---|
ApptimizeOptions
object
Set the name of the device which will appear when connecting to the Visual Apptimizer. If null, Apptimize will generate a name based on the device model and a random unique identifier.
deviceName | The device name, or null |
---|
ApptimizeOptions
object
By default, this is set to false, in which case visual variants and metrics (which can be setup through the Visual Apptimizer) are allowed on any android.app.Activity.
If you set this option to true, visual variants and metrics will only be allowed for an
android.app.Activity if you have explicitly enabled it by annotating it
with ApptimizeExplicitlyEnabled
.
explicitEnablingRequired | Whether visual variants and metrics should only be allowed when explicitly enabled for an android.app.Activity. |
---|
ApptimizeOptions
object
Controls the display of winners and instant updates while forced variables are active.
See Apptimize#forceVariant
showWinnersAndInstantUpdates | True to show winners and instant updates while forced variants are active |
---|
ApptimizeOptions
object
Normally Apptimize will use cached metadata on setup and only checks for metadata after a
certain amount of time has passed since this last check. This happens automatically in the
background. Setting this option will force the check to happen at setup regardless of the age.
Additionally, if setUpdateMetadataTimeout(long)
has been set then apptimize will
also wait on the result of the refresh.
Note: Metadata will not be available, even if it is cached, until after the check is completed when this option is specified.
refreshMetadataOnSetup | True to force a refresh of metadata during Apptimize setup. |
---|
ApptimizeOptions
object
Allows you to tune Apptimize's log level. By default, Apptimize contains a moderate amount of logging about its operations such as reporting when a user is enrolled in experiments. With this option, you can limit Apptimize to only log errors and exceptional circumstances. Note that you will still be able to view the Apptimize logs through the Advanced Verify feature on the Apptimize dashboard. By default, this is set to LogLevel.VERBOSE.
logLevel | A ApptimizeOptions.LogLevel specifying that Apptimize will only
output log messages of importance logLevel or higher |
---|
ApptimizeOptions
object
Allows Apptimize to run in every process of an app with multiple processes. If most of your app is in one process, and you only need to test in that process, you do not need to use this option. You should only use this option if your app is split across multiple Android proccesses. Very few apps will need to use this option, as Google itself recommends against designing apps this way (see official documentation). Use of this option comes with some performance penalty, due to the increased synchronization required.
multiprocessMode | Whether Apptimize should be allowed to run in multiple processes, thereby requiring additional synchronization |
---|
ApptimizeOptions
object
Turns on performance logging for Apptimize. This will log key metrics related to startup and test timings to a file called apptimizePublicTimingLog.txt in your app's data directory.
enabled | Whether Apptimize should log out performance metrics to a file |
---|
ApptimizeOptions
object
Allows Apptimize to export events to 3rd party analytics services.
enabled | defaults to true. Set to false to prevent automatic exporting of our events to 3rd party analytics services. |
---|
ApptimizeOptions
object
Allows Apptimize to import 3rd party analytics events.
enabled | defaults to true. Set to false to prevent automatic importing of other 3rd party analytic events. |
---|
ApptimizeOptions
object
Setting this option indicates to Apptimize that it is okay to wait for the specified amount of time to receive the first metadata update. If not set, Apptimize will not wait.
Apptimize receives metadata that indicates whether this device is
allocated to any currently running A/B tests and, if so, which variant of
each test the device is allocated to. Methods like
runTest(String, ApptimizeTest, ApptimizeOptions)
or
stringForTest(String, String, ApptimizeOptions)
behave differently depending on which tests the device belongs to. If
these methods are run before Apptimize has received its first metadata
update, since Apptimize cannot determine if the user is allocated to the
test, it will fall back to the default behavior and assume the user is
not allocated to the test.
Setting this option indicates that in this scenario, Apptimize should
wait the specified amount of time to receive the first metadata update.
This option is especially useful if you will be calling methods like
runTest(String, ApptimizeTest, ApptimizeOptions)
or
stringForTest(String, String, ApptimizeOptions)
soon after you have called
setup(android.content.Context, String)
.
Note that updateMetadataTimeout
is a maximum, in milliseconds, of
the amount of time we are willing to wait. As soon as Apptimize receives
metadata, it will stop waiting. If Apptimize has already received
metadata in the past, it will not wait at all. The parameter will be
capped at a maximum value of 5000 (i.e., 5 seconds). If
updateMetadataTimeout
is set to the special values of 0 or
negative numbers, Apptimize will use the maximum value of 5000 (i.e., 5
seconds)
updateMetadataTimeout | The maximum amount of time, in milliseconds, that Apptimize is allowed to wait for the initial metadata. |
---|
ApptimizeOptions
object.
Allows Apptimize for visual changes (e.g. hotfixes and visual experiments).
enabled | defaults to true. Set to false to disable visual changes. |
---|
ApptimizeOptions
object
Apptimize.setup() should normally be called and run on the main thread, to ensure that all of the Apptimize functionality is available immediately. In particular, importing 3rd-party events requires Apptimize.setup() to complete. To improve your app's startup performance, you may choose to have setup functionality run on a background thread. If you call options.setupInBackground(true) then Apptimize.setup(...options) will start a background thread and return immediately. Importing of 3rd-party events will not be operational until this background-setup-task completes. If your app calls an Apptimize method that requires setup to have completed, the calling thread will block until the background-setup-task completes
setupInBackground | Whether setup should be in a background thread |
---|
ApptimizeOptions
object