OmniCare SDK (For Android)

Introduction

We build up the medical IoT platform called OmniCare, collecting different kinds of vital signs data from our partners’ devices, in order to be more convenient for third party integration with their application we have developed the OmniCare SDK.

It can easy to communicate with the supported devices, such as create a connection channel, connect device, upload device vital signs data to OmniCare and retrieve the vital signs data back from OmniCare.

System Requirements

Target OS: Android 5.0 (API Level 21) or higher.

How it works

See the sequence diagram below, it shows how does OmniCare SDK work.

 

Getting Started

Adding the OmniCare SDK to an Android Studio Project

The OmniCare SDK is distributed as aar file. To add it to your project, copy OmniCareSDK.aar to the libs folder and add the following to your build.gradle.

repositories { flatDir { dirs 'libs' } } dependencies { implementation(name: 'OmniCareSDK', ext: 'aar') }

Permissions & Service

Add the properties in manifest file. For Android 6.0+, users grant permissions to apps while the app is running, not when they install the app. Please refer official document to add necessary code: https://developer.android.com/training/permissions/requesting.html .

 

<uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <!-- Coarse Location for API <29 (Android 9 and lower) --> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- Fine Location for API >=29 (Android 10 and higher) --> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="android.permission.READ_CONTACTS"/> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- Permission needed for Android Pie to distinguish who is calling --> <uses-permission android:name="android.permission.READ_CALL_LOG"/> <!-- Permission needed for Android Oreo call handling --> <uses-permission android:name="android.permission.ANSWER_PHONE_CALLS"/> <!-- Permission needed to reject incoming phone calls --> <uses-permission android:name="android.permission.CALL_PHONE"/> <!-- Media Control Permission for Advanced Music Controls --> <uses-permission android:name="android.Manifest.permission.MEDIA_CONTENT_CONTROL"/> <!-- Foreground Permission required for newer Android SDKs --> <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>

 

Add the <service> tag below, contained in <application> tag in manifest file.

 

<!-- For VivoWatchBP BLE communication service--> <service android:name="com.asuslife.omnicaresdk.BluetoothLeServiceVivoWatchBP" android:enabled="true" android:exported="false" /> <!-- You can customize NotificationListenerService label name on your own --> <service android:name="com.asuslife.omnicaresdk.NotificationListenerService" android:label="Custom" tools:replace="label"/> <service android:name="com.garmin.android.gncs.GNCSListenerService" android:label="Custom" tools:replace="label"/> <!-- You can change the foreground notification icon on your own → <meta-data tools:replace="resource" android:name="com.garmin.health.foreground_notification_icon" android:resource="@mipmap/ic_launcher"/>

Dependencies

The OmniCare SDK has dependencies on the following third-party library that will need to be included in you project.

 

build.gradle file

How to use the OmniCare SDK

Before using the OmniCare SDK, you need to initialize it first. Add a call to AsusLifeOmniCare.initialize() in the onCreate() method of your Application class. (If you gona build with Garmin devices, please be sure to pass the license key to the init method)

Device Communication

Finding OmniCare Devices

The first step in communication is finding a device to communicate with. The BLE scanning APIs provided by the Android SDK are used for this.

After you hold the Location permission, you have also to verify that Location services are enabled before starting the scan.

 

 

With the prerequisites taken care of, we can start the scan. BluetoothLeScanner requires a ScanCallback to return results of the scan. AsusLifeDeviceScanCallback is provided to filter the scan results to only include OmniCare devices that are supported by the SDK. You must extend this class to get the results of the scan.

 

 

Pairing a Device

Attempt to pair a scanned device returned from BLE scanning in the SDK.

 

 

Syncing & Uploading Data

As the device has been paired, using the method below to sync the vital signs data from device and upload the data to OmniCare.

 

Vital Signs Data Integration

Through OmniCare Platform

After the device syncing is successful, using method below to request vital signs data from OmniCare.

 

 

Additional Information

Proguard Configuration

A number of the libraries required as dependencies for the SDK also have proguard configuration requirements. The complete recommended configuration is located in the SDK Sample App.

 

Release Notes

V1.10.1(Sept 2022)

1.add frequency minimum options to VivoWatch BP/SP/5

 

V1.10.0(May 2022)

1.Fix VivoWatch SP Compatible with new FW.

2.Add getLocalData

 

V1.9.2(May 2022)

1.VivoWatch SP,5 support altitude, air pressure, g sensor.

 

V1.9.1(April 2022)

1.Fix crash when legacy upgrade.

 

V1.9.0(April 2022)

1.Added support for VivoWatch 5.

 

V1.8.0(May 2021)

1.Added support for GERD CAP.

 

V1.7.0(January 2021)

1.Added support for VivoWatch SP.

 

V1.6.2(December 2020)

1.Added data logging during data upload to OmniCare.

 

V1.6.1(September 2020)

1.Security update.

 

V1.6.0(August 2020)

1.In order to ensure the stability of data retrieval, we have established a local database. When the server is abnormal, the data will be returned from the local database.

 

V1.5.0(July 2020)

1.Added support for VivoSmart 4.

 

V1.4.3(June 2020)

1.Fine tuned SSL Pinning logic.

2.Fine tuned IOException(no internet or server connection timed out).

3.Fine tuned device pairing logic.

 

V1.4.2(May 2020)

1.Updated SSL Pinning.

 

V1.4.0(March 2020)

1.Modified GetTokenResponse model(removed sguri).

2.Modified OmniCareECGData model.

3.Added OmniCarePPGData model.

4.Exporting ECG, PPG data from ASUS VivoWatch BP.

 

V1.3.0(January 2020)

1.Set the bluetooth connection service to foreground, you can customize your own foreground service parameters from strings.xml file(keys: omnicaresdk_foreground_service_title, omnicaresdk_foreground_service_message, omnicaresdk_foreground_service_channel_name), it will run in the foreground after OmniCareSDK is initialized.

2.Fixed the sleep data missing issue.(ASUS VivoWatch BP)

3.Revised the sleep data format.(ASUS VivoWatch BP)

4.Added the location data model and ASUS VivoWatch BP exercise mode data paring.

 

V1.2.2(January 2020)

1.Fine tune ASUS VivoWatch BP phone call feature

2.Don't forget to add "<uses-permission android:name="android.permission.READ_CONTACTS"/>" to your AndroidManifest.xml file:

<manifest

...

    <uses-permission android:name="android.permission.READ_CONTACTS"/>

...

</manifest>

 

V1.2.1(January 2020)

1.Fine tune BLE connection

2.Fine tune notification feature

3.Custom label for NotificationListenerService, example as below, added it to your AndroidManifest.xml file:

...

<application

...

<service android:name="com.asuslife.omnicaresdk.NotificationListenerService"

            android:label="Custom"

            tools:replace="label"/>

...

</application>

...

v1.6.2 (2020.12..07)

  1. Add the log to monitor Garmin’s SDK; to see is Garmin’s SDK has potential issues that down unexpectedly

 

V1.2.0(December 2019)

1.New feature
-Added notification setting options to VivoWatch BP

 

V1.1.1(December 2019)

1.Bug fix
-Solving Activity -> Activity data transferring problem.

 

V1.1.0(November 2019)
1.New feature
-FW update
-Pill reminder
-Frequency of checks setting

 

V1.0.0

1.New release.