Salut icon indicating copy to clipboard operation
Salut copied to clipboard

discoverNetworkServices not finding any, if left idle for 1-2 minutes

Open abselt opened this issue 7 years ago • 6 comments

Everything works fine in all cases but not when ClientApp starts and the HostApp starts after it by more than 1-2 minutes -if it starts immediately it works fine- despite ClientApp is still discovering i added a handler ever x seconds to check if isDiscovering and it is true but its like the service"device" wont be found, may be the services list is not refreshing please help with this

abselt avatar Apr 25 '17 11:04 abselt

solved by moving manger.discoverServices(.. into a Handler run every 5sec the problem is both devices must making descovery method at the same time n order to connect to each other

abselt avatar Apr 25 '17 18:04 abselt

That's odd since startNetworkService calls discoverServices. Nonetheless, would you mind submitting a pull request with the fix? Thank you for your work!

neatorobito avatar Apr 25 '17 18:04 neatorobito

it's still unreliable sometimes on diveces rinning marshmillo it would't connect without recreating the client activity should I recreate Salut instance onFail of something

abselt avatar Apr 26 '17 15:04 abselt

aha I just saw wifiInfo.getMacAddress() in salut once I was getting the mac address and after some stackoverflow search it appears that this wont work on marshmillo so i used another way and it works so does the mac address in salut have a hand in establishing the connection does it effect?

abselt avatar Apr 26 '17 16:04 abselt

another note that device.instanceName of discovered device print same as device.readableName

abselt avatar Apr 26 '17 16:04 abselt

Yup, try recreating the Salut instance. And yes, mac addresses have a hand in establishing a connection. Mac addresses are how the devices connect when not in a group. I didn't know that the API changed in Marshmallow. As for the second issue, I've found the line. Thanks!

neatorobito avatar Apr 26 '17 19:04 neatorobito