public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); var controller = NCWidgetController.GetWidgetController(); controller.SetHasContent(true, "com.xamarin.ExtensionsDemo.EvolveCountdownWidget"); }
public void UpdateWidgetContent() { if (ServiceContainer.Resolve <IPlatformInfo> ().IsWidgetAvailable) { var controller = NCWidgetController.GetWidgetController(); controller.SetHasContent(true, NSBundle.MainBundle.BundleIdentifier + ".today"); } }
void TriggerNewDataForWidget() { string todayDocumentName = AppConfig.SharedAppConfiguration.TodayDocumentName; if (document.LocalizedName != todayDocumentName) { return; } // You can use hardcoded value for widget bundle identifier // But it is a good idea to move this value to some kind of setting // Info.plist works for this purpose var widgetBundleId = (string)(NSString)NSBundle.MainBundle.ObjectForInfoDictionary("WidgetBundleIdentifier"); NCWidgetController.GetWidgetController().SetHasContent(true, widgetBundleId); }
private static void UpdateWidget() { var widgetController = NCWidgetController.GetWidgetController(); widgetController?.SetHasContent(true, $"{AboutThisApp.PackageName}.upnext"); }