Skip to content

Instantly share code, notes, and snippets.

@kartikarora
Created October 24, 2024 23:08
Show Gist options
  • Save kartikarora/a01ebf7883d95e9fef7c88d0793c771e to your computer and use it in GitHub Desktop.
Save kartikarora/a01ebf7883d95e9fef7c88d0793c771e to your computer and use it in GitHub Desktop.
Activity 9 Step 2
override fun onUpdate(
context: Context,
appWidgetManager: AppWidgetManager,
appWidgetIds: IntArray,
) {
super.onUpdate(context, appWidgetManager, appWidgetIds)
QuoteWidgetWorker.enqueue(context)
}
override fun onDeleted(context: Context, appWidgetIds: IntArray) {
super.onDeleted(context, appWidgetIds)
QuoteWidgetWorker.cancel(context)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment