Two Devices won't connect through RemoteSystems
soundprojects opened this issue · 3 comments
Hi
I have two devices which I want to have exchanging messages with each other through the RemoteSystems API. I have added the remote capability to the manifest like this:
<uap3:Capability Name="remoteSystem" />
Then in my ViewModel I set up a RemoteWatcher and attach the added, updated and removed events:
RemoteSystemAccessStatus accessStatus = await RemoteSystem.RequestAccessAsync();
if (accessStatus == RemoteSystemAccessStatus.Allowed)
{
m_remoteSystemWatcher = RemoteSystem.CreateWatcher();
m_remoteSystemWatcher.RemoteSystemAdded += M_remoteSystemWatcher_RemoteSystemAdded;
m_remoteSystemWatcher.RemoteSystemRemoved += M_remoteSystemWatcher_RemoteSystemRemoved;
m_remoteSystemWatcher.RemoteSystemUpdated += M_remoteSystemWatcher_RemoteSystemUpdated;
m_remoteSystemWatcher.Start();
}
When I run both devices, they both have an accessStatus of 'Allowed', however Device A does not see Device B. Device B does see Device A but indicates that it is not available through proximity, establishing a connection results in 'RemoteSystemUnavailable'.
Both devices are logged in with the same Microsoft Account and logged in on the same WIFI network.
What can I try to debug this connection issue?
UPDATE:
After some restarts, the connection now returns success. I attach a request received handler and send a message from Device A to B and vice versa. Neither of them receives a request..
AudioW sorry to hear you are having trouble. I've created a bug to track this issue. We'll reach out if we need additional information.
To add: Both devices are running Windows 16193 with the latest SDK. When using the RemoteSystemSession examples from doc.microsoft.com, the Watcher added handler is also not called when I instantiate a RemoteSystemSessionController on Device A and B
Fixed: There was no background activated handler in my app.xaml.cs which seems to be required for this to work.