![]() Int appWidgetIds = appWidgetManager.GetAppWidgetIds(componentName) ĪppWidgetManager.NotifyAppWidgetViewDataChanged(appWidgetIds, Resource.Layout. DataRepository dataRepository MyApplication.get ().dataRepository () dataRepository. Var componentName = new ComponentName(Context.PackageName, (typeof(TodoWidget)).Name) Var manager = AppWidgetManager.GetInstance(this.Context) In Main activity, after adding data I am trying to call method to update widgets but it is not working AppWidgetManager appWidgetManager = AppWidgetManager.GetInstance(this.Context) WidgetView.SetTextViewText(Resource.Id.widgetSmall, new TodoDBR().GetAllRecordsForWidget()) widgetView.SetTextViewText(Resource.Id.widgetMedium, new TodoDBR().GetAllRecordsForWidget()) Private void SetTextViewText(RemoteViews widgetView) From MainaActivity I am trying to update widget data as more data is added from main activity I want widget to refresh class TodoWidget : AppWidgetProvider ![]() ![]() Unfortunately, I cant find any documentation on where this limitation is set, if its a limitation of Android services or if its a limitation. I have a widget which contains on TextView. Im guessing theres a limit built into Android (Im currently running it on Android 12) that likely prevents the system from calling functions too often so as to not eat up too much CPU and/or battery.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |