In SDK 1.17.0 there is a known bug that after trip detection is enabled the SDK may crash the Application on startup with an exception message that says "WorkManager is not initialized properly". To work around this issue implement the following:
Create WorkManagerInitializer
publicclassWorkManagerInitializer : Initializer<WorkManager> {overridefuncreate(context: Context): WorkManager {// NOTE: If your app uses a Custom WorkManager, initialize it here.val configuration = Configuration.Builder().build()try { WorkManager.initialize(context, configuration) } catch (e: Exception){ Log.i("WorkManagerInitializer", "WorkManager initialization threw an error; likely already initialized. Error: $e") }return WorkManager.getInstance(context) }overridefundependencies(): List<Class<outInitializer<*>>> {// No dependencies on other libraries.returnemptyList() }}