nsdmanager

NsdManager discovery does not work on Android 9

你。 提交于 2019-12-23 03:57:16
问题 I have tried for a good time now to get the NsdManager discovery function to work on Android 9. It works on any Android version prior to that without any problems. For testing purposes I use this simple code snippet and there is a permission for "INTERNET" in the manifest. var nsdManager = context.getSystemService(Context.NSD_SERVICE) as NsdManager nsdManager.discoverServices("_https._tcp", NsdManager.PROTOCOL_DNS_SD, object: NsdManager.DiscoveryListener { override fun onDiscoveryStarted

NsdManager discovery does not work on Android 9

被刻印的时光 ゝ 提交于 2019-12-07 11:29:30
I have tried for a good time now to get the NsdManager discovery function to work on Android 9. It works on any Android version prior to that without any problems. For testing purposes I use this simple code snippet and there is a permission for "INTERNET" in the manifest. var nsdManager = context.getSystemService(Context.NSD_SERVICE) as NsdManager nsdManager.discoverServices("_https._tcp", NsdManager.PROTOCOL_DNS_SD, object: NsdManager.DiscoveryListener { override fun onDiscoveryStarted(serviceType: String?) { println("DEBUG: onDiscoveryStarted $serviceType") } override fun onDiscoveryStopped

NSdManager ResolveListener Error Code 3: Failure Already active

风格不统一 提交于 2019-12-01 13:34:31
问题 I'm using NsdManager in an Android App to discover NSD services published by another device also developed by me. I only do service discovery on Android App (no service registration needed on this side). There are several instances of the same type of service published at the same time on the network. I started using the sample code provided by Google (https://developer.android.com/training/connect-devices-wirelessly/nsd) but I had fatal errors due to reusing the same resolver object at the