Bugfixes
This commit is contained in:
parent
ce9f5a6e45
commit
7d2ea5a4d8
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -22,7 +22,7 @@ android {
|
|||||||
applicationId "com.tommasoberlose.anotherwidget"
|
applicationId "com.tommasoberlose.anotherwidget"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 86
|
versionCode 87
|
||||||
versionName "2.0.8"
|
versionName "2.0.8"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
Binary file not shown.
@ -145,7 +145,13 @@ class ActivityDetectionReceiver : BroadcastReceiver() {
|
|||||||
.readData(readRequest)
|
.readData(readRequest)
|
||||||
.addOnSuccessListener { response ->
|
.addOnSuccessListener { response ->
|
||||||
Preferences.googleFitSteps = response.buckets.sumBy {
|
Preferences.googleFitSteps = response.buckets.sumBy {
|
||||||
it.getDataSet(DataType.AGGREGATE_STEP_COUNT_DELTA)?.dataPoints?.get(0)?.getValue(FIELD_STEPS)?.asInt() ?: 0
|
try {
|
||||||
|
it.getDataSet(DataType.AGGREGATE_STEP_COUNT_DELTA)?.dataPoints?.get(
|
||||||
|
0
|
||||||
|
)?.getValue(FIELD_STEPS)?.asInt() ?: 0
|
||||||
|
} catch (ex: Exception) {
|
||||||
|
0
|
||||||
|
}
|
||||||
}.toLong()
|
}.toLong()
|
||||||
MainWidget.updateWidget(context)
|
MainWidget.updateWidget(context)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user