From 14a220364c88ce2be270bea5d0234dfe06ab2163 Mon Sep 17 00:00:00 2001 From: Jong Chern Date: Thu, 2 Sep 2021 23:12:02 +0800 Subject: [PATCH 001/125] first steps towards getting BLE working for Verisense --- .../build.gradle | 4 +-- .../AndroidBleRadioByteCommunication.java | 25 +++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/src/main/java/com/shimmerresearch/androidradiodriver/AndroidBleRadioByteCommunication.java diff --git a/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/build.gradle b/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/build.gradle index ded92b62..97e46b71 100644 --- a/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/build.gradle +++ b/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/build.gradle @@ -74,13 +74,13 @@ dependencies { compile files('libs/ShimmerBiophysicalProcessingLibrary_Rev_0_11.jar') compile files('libs/AndroidBluetoothLibrary.jar') compile files('libs/androidplot-core-0.5.0-release.jar') - implementation (group: 'com.shimmersensing', name: 'ShimmerBluetoothManager', version:'0.9.42beta'){ + implementation (group: 'com.shimmersensing', name: 'ShimmerBluetoothManagerDev', version:'vcba-47 v0.1'){ // excluding org.json which is provided by Android exclude group: 'io.netty' exclude group: 'com.google.protobuf' exclude group: 'org.apache.commons.math' } - implementation (group: 'com.shimmersensing', name: 'ShimmerDriver', version:'0.9.138beta'){ + implementation (group: 'com.shimmersensing', name: 'ShimmerDriverDev', version:'vcba-47 v0.1'){ // excluding org.json which is provided by Android exclude group: 'io.netty' exclude group: 'com.google.protobuf' diff --git a/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/src/main/java/com/shimmerresearch/androidradiodriver/AndroidBleRadioByteCommunication.java b/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/src/main/java/com/shimmerresearch/androidradiodriver/AndroidBleRadioByteCommunication.java new file mode 100644 index 00000000..0692570c --- /dev/null +++ b/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/src/main/java/com/shimmerresearch/androidradiodriver/AndroidBleRadioByteCommunication.java @@ -0,0 +1,25 @@ +package com.shimmerresearch.androidradiodriver; + +import com.shimmerresearch.verisense.communication.AbstractByteCommunication; + +public class AndroidBleRadioByteCommunication extends AbstractByteCommunication { + @Override + public void connect() { + + } + + @Override + public void disconnect() { + + } + + @Override + public void writeBytes(byte[] bytes) { + + } + + @Override + public void stop() { + + } +} From fd229b6cca6c3b17f6cb8e7c819b0d0bb06cedab Mon Sep 17 00:00:00 2001 From: Jong Chern Date: Fri, 3 Sep 2021 18:08:34 +0800 Subject: [PATCH 002/125] ok some basics working now --- .gitignore | 91 +++++++++- ShimmerAndroidInstrumentDriver/.gitignore | 103 ++++++++--- .../.idea/compiler.xml | 6 + .../.idea/gradle.xml | 1 + ShimmerAndroidInstrumentDriver/.idea/misc.xml | 4 + .../ShimmerAndroidInstrumentDriver/.gitignore | 103 ++++++++--- .../build.gradle | 1 + .../AndroidBleRadioByteCommunication.java | 127 +++++++++++++ ShimmerAndroidInstrumentDriver/build.gradle | 1 + .../settings.gradle | 2 +- .../shimmerBLEBasicExample/.gitignore | 89 +++++++++ .../shimmerBLEBasicExample/README.md | 22 +++ .../shimmerBLEBasicExample/build.gradle | 70 ++++++++ .../shimmerBLEBasicExample/proguard-rules.pro | 21 +++ .../ExampleInstrumentedTest.java | 26 +++ .../src/main/AndroidManifest.xml | 25 +++ .../com/shimmerbasicexample/MainActivity.java | 162 +++++++++++++++++ .../drawable-v24/ic_launcher_foreground.xml | 34 ++++ .../res/drawable/ic_launcher_background.xml | 170 ++++++++++++++++++ .../src/main/res/layout/activity_main.xml | 54 ++++++ .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3056 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 5024 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2096 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2858 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4569 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 7098 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 6464 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10676 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 9250 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 15523 bytes .../src/main/res/values/colors.xml | 6 + .../src/main/res/values/strings.xml | 3 + .../src/main/res/values/styles.xml | 8 + .../shimmerbasicexample/ExampleUnitTest.java | 17 ++ .../shimmerbasicexample/ExampleUnitTest.java | 17 ++ .../shimmerBasicExample/.gitignore | 90 +++++++++- 38 files changed, 1209 insertions(+), 54 deletions(-) create mode 100644 ShimmerAndroidInstrumentDriver/.idea/compiler.xml create mode 100644 ShimmerAndroidInstrumentDriver/.idea/misc.xml create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/.gitignore create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/README.md create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/build.gradle create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/proguard-rules.pro create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/androidTest/java/shimmerresearch/com/shimmerbasicexample/ExampleInstrumentedTest.java create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/AndroidManifest.xml create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/java/shimmerresearch/com/shimmerbasicexample/MainActivity.java create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/drawable/ic_launcher_background.xml create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/layout/activity_main.xml create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/values/colors.xml create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/values/strings.xml create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/main/res/values/styles.xml create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/test/java/com/shimmerresearch/shimmerbasicexample/ExampleUnitTest.java create mode 100644 ShimmerAndroidInstrumentDriver/shimmerBLEBasicExample/src/test/java/shimmerresearch/com/shimmerbasicexample/ExampleUnitTest.java diff --git a/.gitignore b/.gitignore index 9f3d81df..86cdbbe8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,92 @@ ShimmerAndroidInstrumentDriver/build/generated/mockable-android-19.jar ShimmerAndroidInstrumentDriver/build/generated/mockable-android-21.jar -ShimmerAndroidInstrumentDriver/gradle.properties \ No newline at end of file +ShimmerAndroidInstrumentDriver/gradle.properties +# Built application files +*.apk +*.aar +*.ap_ +*.aab + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ +# Uncomment the following line in case you need and you don't have the release build type files in your app +# release/ + +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + +# Android Studio Navigation editor temp files +.navigation/ + +# Android Studio captures folder +captures/ + +# IntelliJ +*.iml +.idea/workspace.xml +.idea/tasks.xml +.idea/gradle.xml +.idea/assetWizardSettings.xml +.idea/dictionaries +.idea/libraries +.idea/jarRepositories.xml +# Android Studio 3 in .gitignore file. +.idea/caches +.idea/modules.xml +# Comment next line if keeping position of elements in Navigation Editor is relevant for you +.idea/navEditor.xml + +# Keystore files +# Uncomment the following lines if you do not want to check your keystore files in. +#*.jks +#*.keystore + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild +.cxx/ + +# Google Services (e.g. APIs or Firebase) +# google-services.json + +# Freeline +freeline.py +freeline/ +freeline_project_description.json + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md + +# Version control +vcs.xml + +# lint +lint/intermediates/ +lint/generated/ +lint/outputs/ +lint/tmp/ +# lint/reports/ + +# Android Profiling +*.hprof \ No newline at end of file diff --git a/ShimmerAndroidInstrumentDriver/.gitignore b/ShimmerAndroidInstrumentDriver/.gitignore index ecc2fdb4..0b7b04c2 100644 --- a/ShimmerAndroidInstrumentDriver/.gitignore +++ b/ShimmerAndroidInstrumentDriver/.gitignore @@ -1,38 +1,89 @@ # Built application files -/**/build/ +*.apk +*.aar +*.ap_ +*.aab -# Crashlytics configuations -com_crashlytics_export_strings.xml +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ +# Uncomment the following line in case you need and you don't have the release build type files in your app +# release/ + +# Gradle files +.gradle/ +build/ # Local configuration file (sdk path, etc) local.properties -# Gradle generated files -.gradle/ +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log -# Signing files -.signing/ +# Android Studio Navigation editor temp files +.navigation/ -# User-specific configurations -.idea/libraries/ +# Android Studio captures folder +captures/ + +# IntelliJ +*.iml .idea/workspace.xml .idea/tasks.xml -.idea/.name -.idea/compiler.xml -.idea/copyright/profiles_settings.xml -.idea/encodings.xml -.idea/misc.xml +.idea/gradle.xml +.idea/assetWizardSettings.xml +.idea/dictionaries +.idea/libraries +.idea/jarRepositories.xml +# Android Studio 3 in .gitignore file. +.idea/caches .idea/modules.xml -.idea/scopes/scope_settings.xml -.idea/vcs.xml -*.iml +# Comment next line if keeping position of elements in Navigation Editor is relevant for you +.idea/navEditor.xml + +# Keystore files +# Uncomment the following lines if you do not want to check your keystore files in. +#*.jks +#*.keystore + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild +.cxx/ + +# Google Services (e.g. APIs or Firebase) +# google-services.json + +# Freeline +freeline.py +freeline/ +freeline_project_description.json + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md + +# Version control +vcs.xml + +# lint +lint/intermediates/ +lint/generated/ +lint/outputs/ +lint/tmp/ +# lint/reports/ -# OS-specific files -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -ehthumbs.db -Thumbs.db -/ShimmerAndroidInstrumentDriver/gradle.properties +# Android Profiling +*.hprof \ No newline at end of file diff --git a/ShimmerAndroidInstrumentDriver/.idea/compiler.xml b/ShimmerAndroidInstrumentDriver/.idea/compiler.xml new file mode 100644 index 00000000..61a9130c --- /dev/null +++ b/ShimmerAndroidInstrumentDriver/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ShimmerAndroidInstrumentDriver/.idea/gradle.xml b/ShimmerAndroidInstrumentDriver/.idea/gradle.xml index 167b8ae3..157a10ca 100644 --- a/ShimmerAndroidInstrumentDriver/.idea/gradle.xml +++ b/ShimmerAndroidInstrumentDriver/.idea/gradle.xml @@ -15,6 +15,7 @@