|
YAACC - UPNP Client and Server
|
The Android side of the player discovery (issue #325): browses {@value SendspinServiceType.TYPE} with NsdManager and gives every resolved service to the SendspinDirectory.
More...

Public Member Functions | |
| SendspinNsd (Context context, SendspinDirectory directory) | |
| SendspinNsd (Context context, SendspinDirectory directory, String serviceType) | |
| synchronized boolean | isStarted () |
| SendspinDiscoveryLog | log () |
| What the platform said while browsing, for the discovery report. | |
| synchronized SendspinDiscoveryReport.LockState | lockState () |
| synchronized void | start () |
| Starts browsing. | |
| synchronized void | stop () |
| Stops browsing, drops the queue and releases the multicast lock. | |
The Android side of the player discovery (issue #325): browses {@value SendspinServiceType.TYPE} with NsdManager and gives every resolved service to the SendspinDirectory.
Thin on purpose: what to accept (address ranges, ports, the path, caps) is decided by the directory, the order of the resolutions by ResolveQueue and which failures are retried by ResolveRetry (both of the Snapcast discovery, used as they are, as FCast does). It can not be tested on the JVM.
Lifetime. Nothing runs until start(), which the discovery gate calls while a receivers page is visible and the setting is on; stop() ends the browse, the queue and the multicast lock, which is held only between the two. No permission beyond what the app has for UPnP (CHANGE_WIFI_MULTICAST_STATE) is needed. Not in this version: a log and a report for the user as the FCast and Snapcast settings have.
Trust. An announcement is not authenticated: the name is display text, the address comes from the resolution as a number (no name lookup here), the TXT attributes are hints that the directory checks.
| de.yaacc.sendspin.discovery.SendspinNsd.SendspinNsd | ( | Context | context, |
| SendspinDirectory | directory, | ||
| String | serviceType ) |
| serviceType | SendspinServiceType#TYPE for players, SendspinServiceType#SERVER_TYPE for servers |
| synchronized void de.yaacc.sendspin.discovery.SendspinNsd.start | ( | ) |
Starts browsing.
Does nothing when it runs already.

| synchronized void de.yaacc.sendspin.discovery.SendspinNsd.stop | ( | ) |
Stops browsing, drops the queue and releases the multicast lock.
Does nothing when it is stopped.
