Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Background task registration hangs in UWP with GattCharacteristicNotificationTrigger

I'm trying to use an in-process background task to get notifications of a Bluetooth LE device. However, the following code hangs at the last line and does not return:

var bldr = new BackgroundTaskBuilder();
bldr.Name = guid.ToString("N");
var trigger = new GattCharacteristicNotificationTrigger(ch);
bldr.SetTrigger(trigger);
bldr.Register();

Getting the notifications of the device works when using the event-based model in the application. Also, registering the task with a TimeTrigger works, so the declaration in the app manifest is ok.

The computer runs the Creators Update, but the UWP is set to require the Anniversary update as a minimum.

like image 552
Markus Avatar asked Feb 11 '26 11:02

Markus


1 Answers

We've had the same issue with UWP app on windows 10 mobile. It was resolved after we had updated windows 10 mobile to build 10.0.15230.0.

like image 121
Stanislav Mayorov Avatar answered Feb 13 '26 01:02

Stanislav Mayorov