This blog post describes the migration process for the Android TPA library from version 1.7.3 to 5.0.0. The main reasons for this release, and the large version bump, is to align the Android and iOS SDKs as well as fixing some internal inconsistencies.
We have dropped support for SDK Versions below 14, as this is no longer supported on the Google Play store.
TpaConfiguration has received a major overhaul, mostly to align with iOS. This is just an overview of the changes, the documentation has more in depth explanations of the new API.
Everything is disabled by default
Previously a lot of features were enabled by default, from 5.0.0 and going forward features will be disabled by default.
useApi14has been deprecated as SDK versions below 14 are no longer supported.
updateIntervalhas been deprecated. TPA will now check for updates each time the app is in the foreground.
useShakeFeedbackhas been deprecated and replaced with
setLogTypehas been removed and replaced with
enableAnalyticsis a new boolean options that toggles session recording and tracking.
setNonFatalIssuesEnabledis a new boolean that toggles non fatal issues.
setAutomaticUpdateCheckEnabledis a new boolean that toggles automatic update checks with the distribution library.
setMinimumLogLevelConsoleset the minimum log level for logs sent to the console.
setMinimumLogLevelRemoteset the minimum log level for logs sent to TPA.
TpaTracker has been removed. All tracking is now done via
TPA. Manual initialization of
TpaEvent is no longer possible.
TpaTracker.track(category, name) -> TPA.trackEvent(category, name) TpaTracker.track(category, name, tags) -> TPA.trackEvent(cateogry, name, tags) TpaTracker.track(tpaEvent) -> TPA.trackEvent(cateogry, name)
Similar to tracking
TpaLog has been removed in favor of
TpaLog.d(TAG, “This is a debug log line”) -> TPA.log.d(TAG, “This is a debug log line”) TpaLog.i(TAG, “This is an info log line”) -> TPA.log.i(TAG, “This is an info log line”) TpaLog.w(TAG, “This is a warning log line”) -> TPA.log.w(TAG, “This is a warning log line”) TpaLog.e(TAG, “This is an error log line”) -> TPA.log.d(TAG, “This is an error log line”)
The utility class
TagsBuilder has been added to simplify building tag maps.
TPA.trackEvent(category, name, new TagsBuilder() .addTag("My Tag", "My Value") .build());