Connecting devices on stage using Google Nearby (V5.x.x)
If you have multiple devices on stage running OpenSongApp you can now connect them using Google Nearby which is built into the app. This allows you to have one device act as a host that controls multiple other devices. You can change songs, sections and transmit songs stored on the host to clients (who can view and even copy them to their library).
The host and client devices can be in the same or different modes to each other. E.g. a host could be the device connected to the projector and the clients are the on stage devices. Alternatively, the band leader could be the host sending the song and sections from their stage mode to a client device running presentation mode that is connected to a projector and other client devices running performance mode on stage.
Here is a short video demonstration courtesy of Jeremiah, which is based on a slightly older version of the app, but the features are shown nicely with the host device in this case running Presentation mode and four client devices running Performance mode.
In order to make connections, you will need to allow Location permissions (this is part of the Bluetooth permission that is used to find other nearby devices). Google Nearby will use a combination of Bluetooth, Bluetooth LE and WiFi to make connections. Devices don't need to have WiFi or Bluetooth turned on and they do not need to be connected to a WiFi router, or be on the same network - Google Nearby will make its own connection!
Open the options menu and select the 'Connect devices' setting. If permission has not already been given for locations permissions (for Bluetooth), you will need to grant permission and open the menu again.
You will then see the connections options. By default the app will use your device nickname (often from Bluetooth), however, you can change your device name by clicking on the name in the Connect Devices menu.
Host
At least one device must be set to be the host (controlling device).
Switch on the 'Act as host' button
The log will now tell you that your device is broadcasting/advertising as a host.
Wait for a client to join you and give permission.
If you only want to accept new clients when on this menu (i.e. not receive requests during a performance), you can switch on the option to only listen for connections when this page is visible.
Hosts will continuously broadcast a service while the app is open.
Client
Once the host has started broadcasting/advertising, the client devices are now ready to make connections.
Switch on 'Act as client'. The log will now tell you that your device is now discovering services (looking for hosts). This will timeout after 10 seconds, but you can try again using the discover services button.
Once Google Nearby finds a host device, you will be asked to give permission to make the connection. The host also has to give permission on their device.
Receiving / Keeping host songs
Host
The host device always broadcasts the following information:
Song name and folder containing the song. If client devices have the song in the same storage location as the host, the song will be loaded.
An entire copy of the song (either the OpenSong formatted song or a streamed PDF file)
Start/stop pad/metronome/autoscroll notifications
The host does not need to switch on the additional settings show below .
Client
The client device by default will listen for the above information and try to load the song using the folder and filename received. If the client doesn't have the song, they will see the error message that the song doesn't exist on their device. Client devices have the following options, depending on what they want to do:
Make sure beforehand that all songs exist on their device. They can then use their own copy of the song, with their own notes, etc. However, if they are using the app in Presentation or Stage Mode, they should make sure that the song is split into the same sections as the host's version, otherwise they may end up using the wrong song section.
Switch on ' Receive Host Songs'. With this option switched on, the client will always load the same version of the song as the host is using. If the client has their own version of the song on their device, this version is not altered or used. They simply view the host's version of the song.
Switch on 'Keep Host Songs'. This only works if you have also switched on 'Receive Host Songs'. This loads the host's version of the song on the client device and then makes a copy of the song on the client device. If the song already exists on the client device, it will be overwritten. This method is useful to get copies of songs from another device during a set. It can be switched on/off at any point.
Changing the host/client
Once a connection has been established, the host can easily be changed. Simply switch the 'Act as host' switch on on the desired device. Multiple devices can act as hosts if required, but only devices that are acting as clients will receive song information.
Close the connection
To close the connection, select the 'Off' option in the connections menu.