Closed tabearunzheimer closed 1 year ago
I figured it out, so for everyone else interested:
# start snapclient
adb shell am startservice --es EXTRA_HOST '<snapcast-server>' --ei EXTRA_PORT <snapcast-port> -f 0x24000000 -a ACTION_START -n de.badaix.snapcast/.SnapclientService
# stop snapclient
adb shell am startservice --es EXTRA_HOST '<snapcast-server>' --ei EXTRA_PORT <snapcast-port> -f 0x24000000 -a ACTION_STOP -n de.badaix.snapcast/.SnapclientService
# example values
adb shell am startservice --es EXTRA_HOST '192.168.178.30' --ei EXTRA_PORT 1704 -f 0x24000000 -a ACTION_START -n de.badaix.snapcast/.SnapclientService
Technically, it should be stopservice
to stop snapclient, but it works both ways. Just make sure to change the action (-a ACTION_START
or -a ACTION_STOP
). Hope this helps someone else.
Hey there, I really love your project. I've been using Snapcast for a while now and due to a recent update on my setup I've been wondering if there is a way to control snapdroid with adb commands. I am able to start and stop the app itself but I was hoping I could turn on/off the client as well. I'm planning on building my device into another setup so this would be immensely helpful. Otherwise I would always have to dis- and reassemble everything, if the client stops.
According to the
SnapclientService.java
andMainActivity.java
files, I figured the intent must be something likeACTION_START
orACTION_STOP
, but it doesn't work. The closest reaction I've got, seemed to be reopening the MainActivity on top of the existing one.Any help on this is highly appreciated.