Skip to content

Commit

Permalink
Issue #136: Android demo and example projects both were missing Kotli…
Browse files Browse the repository at this point in the history
…n support. Both apps crashed when device was connected
  • Loading branch information
JOikarinen committed Mar 9, 2021
1 parent 1fced7c commit d13d1e1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions demos/Android-Demos/PolarSDK-ECG-HR-Demo/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ dependencies {
implementation 'io.reactivex.rxjava3:rxjava:3.0.0'
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation "androidx.core:core-ktx:1.3.2"
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
Expand Down
4 changes: 3 additions & 1 deletion demos/Android-Demos/PolarSDK-ECG-HR-Demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

ext.kotlin_version = '1.4.31'
repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 29
Expand Down Expand Up @@ -35,6 +36,8 @@ dependencies {
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
implementation 'commons-io:commons-io:2.8.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation "androidx.core:core-ktx:1.3.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class MainActivity extends AppCompatActivity {
Disposable ppiDisposable;
Disposable scanDisposable;
Disposable autoConnectDisposable;
String DEVICE_ID = "8C4CAD2D"; //TODO replace with your device id
String DEVICE_ID = "8C4CBE21"; //TODO replace with your device id
PolarExerciseEntry exerciseEntry;

@Override
Expand Down
4 changes: 3 additions & 1 deletion examples/example-android/androidBleSdkTestApp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

ext.kotlin_version = '1.4.31'
repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

Expand Down

0 comments on commit d13d1e1

Please sign in to comment.