Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

[WIP] replace own bluetooth implementation with TCN reference impleme… #23

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "android/tcn-client-android"]
path = android/tcn-client-android
url = https://github.com/TCNCoalition/tcn-client-android
18 changes: 5 additions & 13 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ buildscript {
// module dependency in an application project.
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
if (project == rootProject) {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
}
Expand Down Expand Up @@ -84,18 +87,7 @@ repositories {
dependencies {
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+'

// Room
def room_version = "2.2.5"

implementation "androidx.room:room-runtime:$room_version"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
annotationProcessor "androidx.room:room-compiler:$room_version"

implementation 'com.squareup.retrofit2:retrofit:2.7.2'
implementation 'com.squareup.retrofit2:converter-gson:2.7.2'
implementation 'commons-codec:commons-codec:1.14'
implementation project(':tcn-client-android')
}

def configureReactNativePom(def pom) {
Expand Down
2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
android.enableJetifier=true
android.useAndroidX=true
5 changes: 5 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include ':tcn-client-android'

project(":tcn-client-android").projectDir = file("tcn-client-android/tcn-client-android")


Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public ItoBluetoothModule(ReactApplicationContext reactContext) {
}

//make this method synchronous because it has to return a boolean
@ReactMethod(isBlockingSynchronousMethod = true)
@ReactMethod()
public boolean isPossiblyInfected() {
try {
return tracingServiceInterface.isPossiblyInfected();
Expand All @@ -74,7 +74,7 @@ public boolean isPossiblyInfected() {
}

//make this method synchronous because it has to return a boolean
@ReactMethod(isBlockingSynchronousMethod = true)
@ReactMethod()
public int getLatestFetchTime() {
try {
return tracingServiceInterface.getLatestFetchTime();
Expand Down
84 changes: 0 additions & 84 deletions android/src/main/java/org/itoapp/strict/service/BleAdvertiser.java

This file was deleted.

101 changes: 0 additions & 101 deletions android/src/main/java/org/itoapp/strict/service/BleScanner.java

This file was deleted.

Loading