An implementation of the Bluetooth Current Time Service for Android applications communicating with a Bluetooth peripheral.
Copyright 2017 Relish Technologies Ltd.
Add the following to your app's build.gradle
:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile "com.github.RideBeeline:android-bluetooth-current-time-service:$version"
}
The latest version is shown at the top of this README.
When starting your app, for example in the onCreate
method of your Application
, start CurrentTimeService
. Note that Bluetooth should be enabled on the device to successfully start the service.
boolean success = CurrentTimeService.start(this);
When closing your app make sure to stop the service, for example in the onTerminate
method of your Application
.
CurrentTimeService.stop();