Merge pull request #165 from OpenSeizureDetector/148-v42x-pinetime-timedate-not-synchronised-to-phone
Added Current Time Service to BLE Data Source
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
OpenSeizureDetector Android App - Change Log
|
OpenSeizureDetector Android App - Change Log
|
||||||
============================================
|
============================================
|
||||||
|
|
||||||
|
V4.2.5 - Set BLE device time if the characteristic is available.
|
||||||
V4.2.4 - Added checks and a FAULT condition for Bluetooth errors in Bluetooth Data Source
|
V4.2.4 - Added checks and a FAULT condition for Bluetooth errors in Bluetooth Data Source
|
||||||
V4.2.3 - Uses 3d accelerometer data to calculate magnitude if vector magnitude is not sent from data source.
|
V4.2.3 - Uses 3d accelerometer data to calculate magnitude if vector magnitude is not sent from data source.
|
||||||
- fixed latched alarms (Issue #146)
|
- fixed latched alarms (Issue #146)
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ The following libraries are used:
|
|||||||
* (jBeep)[http://www.ultraduz.com.br]
|
* (jBeep)[http://www.ultraduz.com.br]
|
||||||
* (Chartjs)[http://www.chartjs.org]
|
* (Chartjs)[http://www.chartjs.org]
|
||||||
* (MPAndroidChart)[https://github.com/PhilJay/MPAndroidChart]
|
* (MPAndroidChart)[https://github.com/PhilJay/MPAndroidChart]
|
||||||
|
* (CurrentTimeService)[https://github.com/RideBeeline/android-bluetooth-current-time-service]
|
||||||
|
|
||||||
Logo based on ["Star of life2" by Verdy p - Own work. Licensed under Public Domain via Wikimedia Commons](http://commons.wikimedia.org/wiki/File:Star_of_life2.svg#mediaviewer/File:Star_of_life2.svg).
|
Logo based on ["Star of life2" by Verdy p - Own work. Licensed under Public Domain via Wikimedia Commons](http://commons.wikimedia.org/wiki/File:Star_of_life2.svg#mediaviewer/File:Star_of_life2.svg).
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ dependencies {
|
|||||||
//androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.1'
|
//androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.1'
|
||||||
implementation 'com.techyourchance:threadposter:1.0.1'
|
implementation 'com.techyourchance:threadposter:1.0.1'
|
||||||
implementation 'com.google.android.material:material'
|
implementation 'com.google.android.material:material'
|
||||||
|
implementation "com.github.RideBeeline:android-bluetooth-current-time-service:0.1.2"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:versionCode="138"
|
android:versionCode="139"
|
||||||
android:versionName="4.2.4">
|
android:versionName="4.2.5">
|
||||||
<!-- android:allowBackup="false" -->
|
<!-- android:allowBackup="false" -->
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import co.beeline.android.bluetooth.currenttimeservice.CurrentTimeService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A data source that registers for BLE GATT notifications from a device and
|
* A data source that registers for BLE GATT notifications from a device and
|
||||||
@@ -153,6 +155,8 @@ public class SdDataSourceBLE extends SdDataSource {
|
|||||||
mSdData.watchSdName = mBleDeviceName;
|
mSdData.watchSdName = mBleDeviceName;
|
||||||
mSdData.watchPartNo = mBleDeviceAddr;
|
mSdData.watchPartNo = mBleDeviceAddr;
|
||||||
|
|
||||||
|
boolean success = CurrentTimeService.startServer(mContext);
|
||||||
|
|
||||||
bleConnect();
|
bleConnect();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -231,6 +235,7 @@ public class SdDataSourceBLE extends SdDataSource {
|
|||||||
mUtil.writeToSysLogFile("SDDataSourceBLE.stop()");
|
mUtil.writeToSysLogFile("SDDataSourceBLE.stop()");
|
||||||
|
|
||||||
bleDisconnect();
|
bleDisconnect();
|
||||||
|
CurrentTimeService.stopServer();
|
||||||
super.stop();
|
super.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user