Matt F
Matt F

Reputation: 204

Set MS Band Tile in BackgroundTask

I've come across the scenario of which I can not create a WriteableBitmap in a BackgroundTask, therefore I'm unable to set the ME tile of the MS Band in the background.

Numerous forum posts have led me to a XamlRenderingBackgroundTask, is this still recommended to be done in C++, even in UWP?

As of now I'm simply trying to change my current BackgroundTask to inherit from XamlRenderingBackgroundTask, instead of IBackgroundTask.

This causes the BackgroundTask to not run at all: The program '[1320] backgroundTaskHost.exe' has exited with code 1 (0x1).

Am I missing something here?

Upvotes: 0

Views: 94

Answers (1)

Matt F
Matt F

Reputation: 204

Figured it out, had to change this:

public async void Run(IBackgroundTaskInstance taskInstance)

To this:

protected async override void OnRun(IBackgroundTaskInstance taskInstance)

Upvotes: 1

Related Questions