Ejemplo n.º 1
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            var controller = NCWidgetController.GetWidgetController();

            controller.SetHasContent(true, "com.xamarin.ExtensionsDemo.EvolveCountdownWidget");
        }
Ejemplo n.º 2
0
 public void UpdateWidgetContent()
 {
     if (ServiceContainer.Resolve <IPlatformInfo> ().IsWidgetAvailable)
     {
         var controller = NCWidgetController.GetWidgetController();
         controller.SetHasContent(true, NSBundle.MainBundle.BundleIdentifier + ".today");
     }
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        private static void UpdateWidget()
        {
            var widgetController = NCWidgetController.GetWidgetController();

            widgetController?.SetHasContent(true, $"{AboutThisApp.PackageName}.upnext");
        }