Android
Android SDK allows you to send/receive messages over satellite and call Somewear APIs when on cell/WiFi.
Sample Repo
https://github.com/somewear-labs/hello-space-android
Install
Add Somewear's Maven Repository to your project build.gradle.
maven {
credentials {
username somewearArtifactsUsername
password somewearArtifactsPassword
}
url "https://somewear-artifacts.appspot.com"
}Define the credentials in your home gradle directory properties, ~/.gradle/gradle.properties. Somewear will distribute these credentials to you over email.
somewearArtifactsUsername=
somewearArtifactsPassword=Add the Somewear UI SDK dependency to your app module's build.gradle.
dependencies {
...
implementation ('com.somewearlabs:somewear-ui:x.x.x')
...
}Initialize the SDK when your application starts up. Your api key is provided to you by Somewear.
Include our “device pill” in your UI to connect to a Somewear device.
Send a Message
You can send text messages to Somewear users directly via phone number or email. You can also broadcast messages to your Somewear Workspace.
Send a Data Payload
You can send arbitrary byte arrays by sending a DataPayload.
Receive Inbound Payloads / Outbound Updates
You can subscribe to inbound payload events by subscribing to the payload observable.
Logging
The SDK uses SLF4J-Android for logging. To enable logging, add a SLF4J compatible logging framework, such as Logback:
Add to src/main/assets/logback.xml:
Last updated