Migration to Android 0.2
We have made some major changes in Apptics SDK 0.2 version.
Initialization changes
- Removed the init method from all the modules. It has been replaced with a single init method which will initialize every Apptics dependencies included in the app.
Copiedimplementation(platform("com.zoho.apptics:apptics-bom:0.2"))
implementation("com.zoho.apptics:apptics-analytics")
implementation("com.zoho.apptics:apptics-crash-tracker")
implementation("com.zoho.apptics:apptics-feedback")
Calling Apptics.init(application) will automatically initialize all Apptics modules added as dependencies. It would initialize Analytics, CrashTracker, and Feedback module.
- Apptics no longer requires DataBinding. If your app doesn't use dataBinding, remove the snippet used in the build.gradle to enable dataBinding.
- Apptics can be initialized anywhere in the application. The earlier restrictions to enable Apptics only on App onCreate or in Activity before onResume state are removed. However, if Apptics is initialized from Activity, it is recommended passing Activity instance instead of Application.
Use the below method to initialize Apptics in Application onCreate.
CopiedApptics.init(application)
Use the below method to initialize Apptics anywhere in the Activity.
CopiedApptics.init(Activity)
Theme changes
We have made changes in the theme UI provided by Apptics. We have removed color tokens provided by Appcompat/Material themes and replaced them with our custom color attributes to make it easier for you to easily customize the UI.
Please refer to the Themes guide to know more.
Apptics analytics
- automaticSessionsTracking and automaticActivityTrackingparams in AppticsAnalytics init method are replaced with automaticSessionTrackingStatus and automaticActivityTrackingStatus member variables in AppticsAnalytics. By default, both are set to true. If required to turn off, make sure to change before calling the Apptics.init.
Crash tracking
- automaticCrashTracking param in AppticsCrashTracker init method is replaced with automaticCrashTrackingStatus member variable in the AppticsCrashTracker. By default, it is set to true. If required to turn off, make sure to change it before calling Apptics.init.
Feedback module
- Removed the init() and initWithShakeForFeedbackTurnedOff() functions. Instead, use the method AppticsFeedback.turnOffShakeToFeedback().
RateUs module
- Removed the init method. The callback for customUiCallback present in the initialization method is also removed from the parameters of the init method. Instead, use customUiCallback member variable of AppticsFeedback.