YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.SendspinSettings Class Reference

The keys and defaults of the Sendspin settings (the keys that have a preference are the names of string resources). More...

Collaboration diagram for de.yaacc.sendspin.SendspinSettings:
Collaboration graph

Classes

interface  BooleanSource
 Reads a boolean preference (the shape of SharedPreferences.getBoolean). More...
 
interface  IntSource
 Reads an integer preference. More...
 

Static Public Member Functions

static boolean isDiscoveryEnabled (BooleanSource source)
 
static boolean isDiscoveryRelevantKey (String key)
 True if a changed preference key is one that decides whether the search runs.
 
static boolean isServerDiscoveryEnabled (BooleanSource source)
 
static boolean isServerDiscoveryRelevantKey (String key)
 True if a changed preference key is one that decides whether the search of servers runs.
 
static boolean isLegacyAllowed (BooleanSource source)
 
static boolean isServicesEnabled (BooleanSource source)
 
static boolean isAdvertiseEnabled (BooleanSource source)
 
static String serverName (String stored)
 
static String clientName (String stored)
 
static int colorBrightnessPercent (IntSource source)
 
static boolean offersColorTuningOnOwnCard (BooleanSource source)
 
static boolean offersScreenBrightness (BooleanSource source)
 
static java.util.List< String > playerDisplayRoles (BooleanSource source)
 
static java.util.List< String > playerCodecs (BooleanSource source)
 The codecs to offer, in the order of the offer (see SendspinCodecs); all of them when the settings can not be read.
 
static boolean isPlayerEnabled (BooleanSource source)
 
static boolean isAnnounceEnabled (BooleanSource source)
 
static boolean isAnnounceRelevantKey (String key)
 True if a changed preference key is one that decides whether the announcement runs.
 
static boolean isAdvertiseRelevantKey (String key)
 True if a changed preference key is one that decides whether the listener runs.
 
static boolean isPlayerRelevantKey (String key)
 True if a changed preference key is one that decides whether the player service runs.
 
static boolean isControllerEnabled (BooleanSource source)
 
static boolean isUnpairedServersAllowed (BooleanSource source)
 
static boolean isUnpairedPlayersAllowed (BooleanSource source)
 
static boolean isEnabled (BooleanSource source)
 

Static Public Attributes

static final String KEY_ENABLED = "settings_sendspin_enabled"
 The key of the switch that makes the app list and use Sendspin players.
 
static final boolean ENABLED_DEFAULT = true
 
static final String KEY_LEGACY = "settings_sendspin_legacy"
 The key of the switch that allows players of the older, unencrypted wire (a protocol that the specification does not define).
 
static final boolean LEGACY_DEFAULT = false
 Off: only the encrypted protocol of the specification is spoken.
 
static final String KEY_SERVICES = "settings_sendspin_services"
 The key of the switch of the Sendspin services (the switch on the first page): the player and the listening server run only while it is on, and the idle timer does not close the app while it is on.
 
static final boolean SERVICES_DEFAULT = false
 
static final String KEY_ADVERTISE = "settings_sendspin_advertise"
 The key of the switch that makes this phone a server that players find and connect to (client-initiated mode).
 
static final String KEY_ANNOUNCE = "settings_sendspin_announce"
 The switch under the server that makes it announce itself on the network (mDNS), so that other devices find it without an address.
 
static final boolean ANNOUNCE_DEFAULT = true
 
static final String KEY_PLAYER = "settings_sendspin_player"
 The switch that makes this phone a Sendspin player (a service listens and announces it); default off.
 
static final boolean PLAYER_DEFAULT = false
 
static final String KEY_PLAYER_PCM = "settings_sendspin_player_pcm"
 The codecs the phone as a player offers (each on or off, all on by default; see SendspinCodecs).
 
static final String KEY_PLAYER_FLAC = "settings_sendspin_player_flac"
 
static final String KEY_PLAYER_OPUS = "settings_sendspin_player_opus"
 
static final boolean ADVERTISE_DEFAULT = false
 Off: nothing listens on the phone and nothing is announced.
 
static final String KEY_REMEMBERED = "sendspin_remembered"
 The key of the players that were selected in the last run (host:port); they stay listed until they are seen again.
 
static final String KEY_PLAYERS = "sendspin_players"
 The key of the players that the user added by address (host:port).
 
static final String KEY_APPROVED = "sendspin_approved"
 The key of the ids of the players the operator approved.
 
static final String KEY_NAMES = "sendspin_names"
 The names the players announced, by client id (only to show them in the lists of paired and approved players).
 
static final String KEY_IDENTITY = "sendspin_identity"
 The key of the private key of this server identity (app-private storage; backup is off).
 
static final String KEY_TOKENS = "sendspin_pairing_tokens"
 Pairing tokens the operator pasted, not yet used: <client id>:<pairing PSK, base64url>.
 
static final String KEY_PAIRINGS = "sendspin_pairings"
 The long-term PSKs of paired players: <client id>:<PSK, base64url>.
 
static final String KEY_UNPAIRED_SERVERS = "settings_sendspin_unpaired_servers"
 The key of "Allow unpaired servers": servers that are not paired with this phone may play on it (the player), and this phone may control servers it is not paired with (the controller).
 
static final boolean UNPAIRED_SERVERS_DEFAULT = false
 
static final String KEY_UNPAIRED_PLAYERS = "settings_sendspin_unpaired_players"
 The key of "Allow unpaired players": players and other YAACC phones that are not paired with this phone may connect to its server, to play music or to control it.
 
static final boolean UNPAIRED_PLAYERS_DEFAULT = false
 
static final String KEY_SERVERS = "sendspin_servers"
 The key of the servers the user added by address (host:port).
 
static final String KEY_CLIENT_IDENTITY = "sendspin_client_identity"
 The key of the private key of the identity this app uses as a Sendspin client (app-private storage; backup is off).
 
static final String KEY_CLIENT_PAIRING_PSK = "sendspin_client_pairing_psk"
 The Pairing PSK behind the token this app shows as a client (one at most).
 
static final String KEY_CLIENT_PAIRINGS = "sendspin_client_pairings"
 The long-term PSKs of the servers this app is paired with as a client.
 
static final int MAX_SERVERS = 8
 The most servers the user can add.
 
static final int MAX_PLAYERS = 16
 The most players the user can add.
 
static final int MAX_LISTED = 32
 The most players the app lists and connects to at all (added, remembered and found together).
 
static final int MAX_APPROVALS = 64
 The most approvals the app remembers (the oldest are dropped).
 
static final int MAX_PAIRINGS = 64
 The most paired players kept; a further pairing is refused until one is removed.
 
static final int MAX_TOKENS = 16
 The most pasted tokens kept at a time.
 
static final String KEY_PLAYER_SHOW_NOW_PLAYING = "settings_sendspin_player_show_now_playing"
 Roles of this phone as a player beyond the speaker (task 11.5); all off by default.
 
static final String KEY_PLAYER_SHOW_COVER = "settings_sendspin_player_show_cover"
 
static final String KEY_PLAYER_SHOW_COLORS = "settings_sendspin_player_show_colors"
 
static final String KEY_PLAYER_COLOR_BRIGHTNESS = "settings_sendspin_player_color_brightness"
 How bright the colour screen is, in percent (5 to 100; 100 shows the colour as the server sent it).
 
static final int DEFAULT_COLOR_BRIGHTNESS = 100
 
static final String DEFAULT_SERVER_NAME = "YAACC"
 The name of the server when "network name for local server" is empty: the default of the UPnP server and of Snapcast.
 
static final String DEFAULT_CLIENT_NAME = "YAACC"
 The name of this phone as a Sendspin client when the shared name is not set.
 

Detailed Description

The keys and defaults of the Sendspin settings (the keys that have a preference are the names of string resources).

Pure. The switch is off by default until the app part has been tried on a device (decision of 2026-11-24 in the spec).

Member Function Documentation

◆ clientName()

static String de.yaacc.sendspin.SendspinSettings.clientName ( String stored)
static
Returns
the name this phone gives in the hello of a Sendspin client (player, controller, source): the shared setting network name for local server if it is set (cleaned, at most 64 characters), else "YAACC"

Referenced by de.yaacc.sendspin.player.SendspinPlayerService.phoneName().

Here is the caller graph for this function:

◆ colorBrightnessPercent()

static int de.yaacc.sendspin.SendspinSettings.colorBrightnessPercent ( IntSource source)
static
Returns
the brightness of the colour screen in percent, kept between 5 and 100 (a damaged value is the default)

◆ isAdvertiseEnabled()

static boolean de.yaacc.sendspin.SendspinSettings.isAdvertiseEnabled ( BooleanSource source)
static
Returns
whether this phone listens for players and announces itself: Sendspin is on, the services are on and the switch of the server is on (default off)

Referenced by de.yaacc.sendspin.SendspinSettings.isAnnounceEnabled(), and de.yaacc.sendspin.SendspinSettings.offersColorTuningOnOwnCard().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isAnnounceEnabled()

static boolean de.yaacc.sendspin.SendspinSettings.isAnnounceEnabled ( BooleanSource source)
static
Returns
whether the server announces itself on the network: the server runs and its announcement switch is on (default on)
Here is the call graph for this function:

◆ isControllerEnabled()

static boolean de.yaacc.sendspin.SendspinSettings.isControllerEnabled ( BooleanSource source)
static
Returns
whether the controller (Sendspin servers as cards, remote control) is on: Sendspin support is on
Here is the call graph for this function:

◆ isDiscoveryEnabled()

static boolean de.yaacc.sendspin.SendspinSettings.isDiscoveryEnabled ( BooleanSource source)
static
Returns
whether the network is searched for players: Sendspin support is on (owner, 2026-11-30: no switch of its own); false for no source or a value that can not be read

Referenced by de.yaacc.sendspin.SendspinHub.discoveryReport().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEnabled()

static boolean de.yaacc.sendspin.SendspinSettings.isEnabled ( BooleanSource source)
static

◆ isLegacyAllowed()

static boolean de.yaacc.sendspin.SendspinSettings.isLegacyAllowed ( BooleanSource source)
static
Returns
whether a player of the older, unencrypted wire may connect; false for no source or a value that can not be read

Referenced by de.yaacc.sendspin.SendspinHub.acquire().

Here is the caller graph for this function:

◆ isPlayerEnabled()

static boolean de.yaacc.sendspin.SendspinSettings.isPlayerEnabled ( BooleanSource source)
static
Returns
whether this phone is a Sendspin player: Sendspin is on, the services are on and the switch of the player is on (default off)

Referenced by de.yaacc.sendspin.SendspinHub.findReceiver(), de.yaacc.sendspin.SendspinSettings.offersScreenBrightness(), de.yaacc.sendspin.SendspinHub.outputTargets(), de.yaacc.sendspin.SendspinHub.receivers(), de.yaacc.sendspin.SendspinHub.selfEndpoint(), and de.yaacc.sendspin.player.SendspinPlayerService.sync().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isServerDiscoveryEnabled()

static boolean de.yaacc.sendspin.SendspinSettings.isServerDiscoveryEnabled ( BooleanSource source)
static
Returns
whether the network is searched for servers: Sendspin support is on

Referenced by de.yaacc.sendspin.SendspinHub.discoveryReport().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isServicesEnabled()

static boolean de.yaacc.sendspin.SendspinSettings.isServicesEnabled ( BooleanSource source)
static
Returns
whether the Sendspin services are on: the support is on and their switch is on (default off)

Referenced by de.yaacc.sendspin.SendspinSettings.isAdvertiseEnabled(), de.yaacc.sendspin.SendspinPower.isOn(), and de.yaacc.sendspin.SendspinSettings.isPlayerEnabled().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isUnpairedPlayersAllowed()

static boolean de.yaacc.sendspin.SendspinSettings.isUnpairedPlayersAllowed ( BooleanSource source)
static
Returns
whether a player or another YAACC phone that is not paired may connect to the server of this phone (default off)

◆ isUnpairedServersAllowed()

static boolean de.yaacc.sendspin.SendspinSettings.isUnpairedServersAllowed ( BooleanSource source)
static
Returns
whether a server that is not paired may play on this phone, and this phone may control one (default off)

◆ offersColorTuningOnOwnCard()

static boolean de.yaacc.sendspin.SendspinSettings.offersColorTuningOnOwnCard ( BooleanSource source)
static
Returns
whether the sheet of this phone's own card offers the sliders of the colours that this phone makes (a server's task): only while the server that players connect to is on; the cards of other players always offer them (the hub sends them colours)
Here is the call graph for this function:

◆ offersScreenBrightness()

static boolean de.yaacc.sendspin.SendspinSettings.offersScreenBrightness ( BooleanSource source)
static
Returns
whether the sheet of this phone's own card offers the brightness of its colour screen: the player and its colour display are on
Here is the call graph for this function:

◆ playerDisplayRoles()

static java.util.List< String > de.yaacc.sendspin.SendspinSettings.playerDisplayRoles ( BooleanSource source)
static
Returns
the display roles the phone offers a server, from the three switches; empty if none is on

◆ serverName()

static String de.yaacc.sendspin.SendspinSettings.serverName ( String stored)
static
Returns
the name of this phone as a Sendspin server: the shared setting network name for local server (as for the UPnP server and Snapcast), without control characters and at most 64 characters long; the default if it is empty

Member Data Documentation

◆ KEY_ANNOUNCE

final String de.yaacc.sendspin.SendspinSettings.KEY_ANNOUNCE = "settings_sendspin_announce"
static

The switch under the server that makes it announce itself on the network (mDNS), so that other devices find it without an address.

On by default; the server runs without it for devices that are told its address.

Referenced by de.yaacc.sendspin.SendspinSettings.isAnnounceEnabled(), and de.yaacc.sendspin.SendspinSettings.isAnnounceRelevantKey().

◆ KEY_PAIRINGS

final String de.yaacc.sendspin.SendspinSettings.KEY_PAIRINGS = "sendspin_pairings"
static

The long-term PSKs of paired players: <client id>:<PSK, base64url>.

A credential.

Referenced by de.yaacc.sendspin.SendspinPairings.completePairing().

◆ KEY_SERVICES

final String de.yaacc.sendspin.SendspinSettings.KEY_SERVICES = "settings_sendspin_services"
static

The key of the switch of the Sendspin services (the switch on the first page): the player and the listening server run only while it is on, and the idle timer does not close the app while it is on.

Searching and controlling need only KEY_ENABLED.

Referenced by de.yaacc.sendspin.SendspinPower.changesFor(), de.yaacc.sendspin.SendspinSettings.isAdvertiseRelevantKey(), de.yaacc.sendspin.SendspinSettings.isPlayerRelevantKey(), and de.yaacc.sendspin.SendspinSettings.isServicesEnabled().

◆ KEY_TOKENS

final String de.yaacc.sendspin.SendspinSettings.KEY_TOKENS = "sendspin_pairing_tokens"
static

Pairing tokens the operator pasted, not yet used: <client id>:<pairing PSK, base64url>.

A credential.

Referenced by de.yaacc.sendspin.SendspinPairings.addToken(), and de.yaacc.sendspin.SendspinPairings.completePairing().

◆ KEY_UNPAIRED_PLAYERS

final String de.yaacc.sendspin.SendspinSettings.KEY_UNPAIRED_PLAYERS = "settings_sendspin_unpaired_players"
static

The key of "Allow unpaired players": players and other YAACC phones that are not paired with this phone may connect to its server, to play music or to control it.

Off by default.

Referenced by de.yaacc.sendspin.SendspinSettings.isUnpairedPlayersAllowed().

◆ KEY_UNPAIRED_SERVERS

final String de.yaacc.sendspin.SendspinSettings.KEY_UNPAIRED_SERVERS = "settings_sendspin_unpaired_servers"
static

The key of "Allow unpaired servers": servers that are not paired with this phone may play on it (the player), and this phone may control servers it is not paired with (the controller).

Off by default (owner, 2026-11-30).

Referenced by de.yaacc.sendspin.SendspinSettings.isUnpairedServersAllowed().


The documentation for this class was generated from the following file: