public static async Task AddSampleUserActivity()
        {
            var activityId  = nameof(SchemeActivationSamplePage);
            var displayText = "PIANTE E FIORI";
            var description = $"Torna alle schede botaniche '{Package.Current.DisplayName}' at {DateTime.Now.ToShortTimeString()}";
            var imageUrl    = "ms-appx:///Assets/lotus_1600.png";
            //var imageUrl = "http://adaptivecards.io/content/cats/2.png";

            var activityData = new UserActivityData(activityId, CreateActivationDataSample(), displayText, Colors.DarkRed);
            var adaptiveCard = CreateAdaptiveCardSample(displayText, description, imageUrl);

            await UserActivityService.CreateUserActivityAsync(activityData, adaptiveCard);
        }
示例#2
0
        private async Task StartupAsync()
        {
            await ThemeSelectorService.SetRequestedThemeAsync();

            // TODO WTS: This is a sample to demonstrate how to add a UserActivity. Please adapt and move this method call to where you consider convenient in your app.
            await UserActivityService.AddSampleUserActivity();

            await Singleton <DevCenterNotificationsService> .Instance.InitializeAsync();

            await FirstRunDisplayService.ShowIfAppropriateAsync();

            await WhatsNewDisplayService.ShowIfAppropriateAsync();
        }