public static async Task AddSampleUserActivity()
        {
            var activityId  = nameof(SchemeActivationSamplePage);
            var displayText = "Sample Activity";
            var description = $"Sample UserActivity added from Application '{Package.Current.DisplayName}' at {DateTime.Now.ToShortTimeString()}";
            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);
        }
Exemple #2
0
        private async Task StartupAsync()
        {
            await ThemeSelectorService.SetRequestedThemeAsync();

            await UserActivityService.AddSampleUserActivity();
        }