Last active
November 18, 2020 16:38
-
-
Save waliahimanshu/49cf8341f78802a59ac4de01c1e983b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val appWidgetManager = AppWidgetManager.getInstance(context) | |
private val provider = ComponentName(context, YourAppWidget::class.java) | |
private val allWidgetIds = appWidgetManager.getAppWidgetIds(provider) | |
fun updateWigetView(type: ViewStateType) { | |
allWidgetIds.forEach { widgetId -> | |
appWidgetManager.updateAppWidget(widgetId, remoteViews) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment