This library makes declaring Smart App lifecycle handlers as Google Guice components easy.
- Java 1.8+
- Google Guice 4.2+
- smartapp-core
- A Samsung account
Include the smartapp-core
Maven dependency:
<dependency>
<groupId>com.smartthings.sdk</groupId>
<artifactId>smartapp-guice</artifactId>
<version>0.0.4-PREVIEW</version>
</dependency>
If you're using Gradle:
dependencies {
compile 'com.smartthings.sdk:smartapp-guice:0.0.4-PREVIEW'
}
If you do not use Maven or Gradle, jars can be downloaded from the central Maven repository.
This library adds to smartapp-core
by giving you the ability to create a SmartAppDefinition
using handlers defined as Guice beans. To do this, you can use Guice.smartapp
to build an instance of SmartAppDefinition
using your Guice module.
SmartAppDefinition smartAppDefinition = Guice.smartapp(bindings -> bindings.module(appModule));
For a complete example, see the Java Ratpack Guice example SmartApp.
Check out our complete developer documentation here.
To create and manage your services and devices on SmartThings, create an account in the developer workspace.
The SmartThings Community is a good place share and ask questions.
There is also a SmartThings reddit community where you can read and share information.
Licensed under the Apache License, Version 2.0
Copyright 2019 SmartThings, Inc.