Which Coroutine scope to use in AppWidgetProvider class?
I am currently creating a widget and I am configuring the widget with a configuration activity and initializing the widget on onUpdate() of AppWidgetProvider. After that a CoroutineWorker will update the widget from time to time. I have set the updatePeriodMillis to 0.
So simply my code would be
override fun onUpdate(context: Context?, appWidgetManager: AppWidgetManager?, appWidgetIds: IntArray?) {
if(!widget_configured)
{
//configure widget & start the service.
}
}
So...