Android : Stopping a Bonjour service left running after the parent process quit abrubtly
问题 My app is essentially a background service that needs to occasionally register an NSD service ( Bonjour service) for the purpose of enabling discovery of a socket server run by the main background service (aka run by the app). If I am reading the Android Bonjour Service doc correctly, this is how you start the Bonjour service (abbreviated for conciseness): mNsdManager = Context.getSystemService(Context.NSD_SERVICE); mDiscoveryListener = new NsdManager.DiscoveryListener() mNsdManager