from Android Developers
"By default, pressing the volume control modifies the volume of the active audio stream. If your app isn't currently playing anything, hitting the volume keys adjusts the music volume (or the ringer volume before Android 9)."
Therefore if Spotify is playing the device buttons should control the volume ?
You could try the Player volume blocks to see if that works ?
Or try to discover the intent (action), package and class required to open the volume control with activityStarter
[EDIT] sorry got it in my head you only wanted to control the volume