I am trying to implement a PrintService. I am using Network Service Discovery (NSD) to find the printers (c.f. https://developer.android.com/training/connect-devices-wirelessly/nsd.html, etc) Both the NsdManager.DiscoveryListener
and the NsdManager.ResolveListener
make asynchronous calls. However, the system calls my onStartPrinterDiscovery()
before the NSD functions are called. I don't see any other opportunity to call addPrinters()
.
How can this work?