Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.vmichalak:sonos-controller:v.0.1'
}
dependencies {
implementation("com.github.vmichalak:sonos-controller:v.0.1")
}
<dependency>
<groupId>com.github.vmichalak</groupId>
<artifactId>sonos-controller</artifactId>
<version>v.0.1</version>
</dependency>
libraryDependencies += "com.github.vmichalak" % "sonos-controller" % "v.0.1"
:dependencies [[com.github.vmichalak/sonos-controller "v.0.1"]]
Java API for controlling SONOS players.
100% Android and Kotlin compatible.
Discovery all Sonos Devices on your network.
List<SonosDevice> devices = SonosDiscovery.discover();
Connect to a known Sonos and pause currently playing music.
SonosDevice sonos = new SonosDevice("10.0.0.102");
sonos.pause();
To clone and recover the dependencies do the following commands:
git clone https://github.com/vmichalak/sonos-controller.git
cd sonos-controller
git submodule init
git submodule update
The current lead maintainer is Valentin Michalak (twitter)
Feel free to participate !
There is a Sonos Controller group over at Slack. Feel free to drop by for support, ideas or casual conversation related to Sonos Controller and Sonos in general :wink:.
Sonos Remote Controller based on Android Things by Michael Guntli
Special Thanks to rahims for is work on Sonos API !
Released under the MIT license.