Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Universal App maintain open WebSocket

How to have a WebSocket open on Windows Universal App? Can I have my WebSocket to be open even when app is closed?

like image 375
Andrei Avatar asked May 29 '26 11:05

Andrei


1 Answers

On a Windows Universal app? Yes. On a Windows Phone 8.1 app? No.

A Windows Store app can use a ControlChannelTrigger to receive socket notifications in a background task even if the main app is suspended. This is demonstrated in the ControlChannelTrigger StreamWebSocket sample in the Windows Dev Center.

ControlChannelTrigger is not supported in Windows Phone Store apps, but it is supported in Universal Windows 10 apps on mobile devices.

like image 55
Rob Caplan - MSFT Avatar answered May 31 '26 06:05

Rob Caplan - MSFT



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!