Skip to content

Commit

Permalink
0.9.9-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
Woohyeok Choi committed Oct 11, 2020
1 parent 4e40919 commit c9479ee
Show file tree
Hide file tree
Showing 93 changed files with 7,305 additions and 1,873 deletions.
49 changes: 39 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,45 @@
# ABC Logger: For the collection of a variety of smartphone data

## Download
* Please check a [release page](https://github.com/woohyeok-choi/ABC-Logger/releases).

## Guide
## How-to-Use
* Check this [Link](https://docs.google.com/presentation/d/1Spsh91PjZ-rfkQiY6rQLb5tOxaEkIvrDn3eZffrZgs4/edit?usp=sharing)

## For team members
## Directory Structure
- [app](app)
- [grpc](app/grpc): Sub-module for gRPC specification ([Link](https://github.com/woohyeok-choi/ABC-Logger-gRPC-Specs))
- Checkout whenever the sub-module is updated.
- abc-logger-client.json: Secrets for server communications and android key-store (not shown publicly)
- google-services.json: Secrets for Firebase and Google APIs (not shown publicly)
- [libs](app/libs): Additional libraries (e.g., polar-ble-sdk.jar for Polar H10 Communication).

- [source](app/src/main/kotlin/kaist/iclab/abclogger)
- [adapter](app/src/main/kotlin/kaist/iclab/abclogger/adapter): ViewBinding adapters
- [collector](app/src/main/kotlin/kaist/iclab/abclogger/collector): Implementation of data collectors
- [commons](app/src/main/kotlin/kaist/iclab/abclogger/commons): Common functions
- [core](app/src/main/kotlin/kaist/iclab/abclogger/core): Core functions (e.g., authorization, data upload, notification, preferences).
- [dialog](app/src/main/kotlin/kaist/iclab/abclogger/dialog): Simple dialog builder
- [structure](app/src/main/kotlin/kaist/iclab/abclogger/structure): Data structure for shared-use (not same as database).
- [config](app/src/main/kotlin/kaist/iclab/abclogger/structure/config): Structure for configuration items
- [survey](app/src/main/kotlin/kaist/iclab/abclogger/structure/survey): Structure for survey questions
- [ui](app/src/main/kotlin/kaist/iclab/abclogger/ui): Implementation for activities and fragments
- [base](app/src/main/kotlin/kaist/iclab/abclogger/ui/base): Abstract activities and fragments
- [config](app/src/main/kotlin/kaist/iclab/abclogger/ui/config): Config fragments
- [main](app/src/main/kotlin/kaist/iclab/abclogger/ui/main): Main activity
- [settings](app/src/main/kotlin/kaist/iclab/abclogger/ui/settings): Customized setting activities for some data (e.g., typing speed, Polar H10, survey)
- [splash](app/src/main/kotlin/kaist/iclab/abclogger/ui/splash): Splash activity; initial authorization and permission requests.
- [survey](app/src/main/kotlin/kaist/iclab/abclogger/ui/survey): Survey list and response fragments
- [view](app/src/main/kotlin/kaist/iclab/abclogger/view): Custom view implementation

## How-to-Make a Survey
* Check [this](guides/survey-instruction.md)

## Related Projects
* [ABC Logger Server](https://github.com/woohyeok-choi/ABC-Logger-Server)
* [ABC Logger gRPC specification](https://github.com/woohyeok-choi/ABC-Logger-gRPC-Specs)
* [ABC Logger gRPC communication for Python](https://github.com/woohyeok-choi/ABC-Logger-CRUD-Boilerplate)

## Download
* [Release Page](https://github.com/woohyeok-choi/ABC-Logger/releases)

## Secrets (for qualified members only)
* Check [this](https://docs.google.com/document/d/1h7MI8P9RrywgHGY0U7LNLkN_geRb_D54BSLYjqgxKjs)

## Coding Convention
* For Fragment and Activity (especially, which uses ViewModel), do not use data binding library, because:
* Some view model requires operations in a source, not XML (e.g., RecyclerView adapter)
* Especially, LiveData only can be assigned into views using source, not XML.
* For a layout or view inside fragment or activity, data binding can be used.
9 changes: 9 additions & 0 deletions app/abc-logger-client.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"server_address": "abc.kaist.ac.kr:50030",
"server_auth_token": "abclogger-android-client",
"test_server_address": "143.248.90.87:50030",
"keystore_path": "F:/Certificates/abclogger.jks",
"keystore_password": "iclabsystem12!@",
"key_alias": "abclogger",
"key_password": "iclabsystem12!@"
}
1 change: 1 addition & 0 deletions app/apks/debug/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":26,"versionName":"0.9.9-c","enabled":true,"outputFile":"kaist.iclab.abclogger-v0.9.9-c-debug.apk","fullName":"debug","baseName":"debug"},"path":"kaist.iclab.abclogger-v0.9.9-c-debug.apk","properties":{}}]
51 changes: 31 additions & 20 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ kapt {
}

android {
signingConfigs {
abclogger {
storeFile file(rootProject.ext.keystore_path)
storePassword rootProject.ext.keystore_password
keyAlias rootProject.ext.key_alias
keyPassword rootProject.ext.key_password
}
}

compileSdkVersion 30
buildToolsVersion "30.0.2"

Expand All @@ -37,30 +46,31 @@ android {
applicationId "kaist.iclab.abclogger"
minSdkVersion 23
targetSdkVersion 30
setProperty("archivesBaseName", "$applicationId-v.$versionName")

versionCode 27
versionName "0.9.9-d"

setProperty("archivesBaseName", "$applicationId-v.$versionName")
buildConfigField("Boolean", "GENERATE_DUMMY_ENTITY", "false")
buildConfigField("String", "SERVER_ADDRESS", "\"${config.server_address}\"")
buildConfigField("String", "SERVER_AUTH_TOKEN", "\"${config.server_auth_token}\"")
buildConfigField("String", "SERVER_ADDRESS", "\"${rootProject.ext.server_address}\"")
buildConfigField("String", "SERVER_AUTH_TOKEN", "\"${rootProject.ext.server_auth_token}\"")
}

buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.abclogger
}

debug {
debuggable true
}

staging {
initWith debug
buildConfigField("String", "SERVER_ADDRESS", "\"${config.test_server_address}\"")
debuggable true
buildConfigField("String", "SERVER_ADDRESS", "\"${rootProject.ext.test_server_address}\"")
buildConfigField("Boolean", "GENERATE_DUMMY_ENTITY", "true")
signingConfig signingConfigs.abclogger
}
}

Expand Down Expand Up @@ -112,14 +122,14 @@ dependencies {
* Firebase
*/
implementation "com.google.firebase:firebase-core:17.5.0"
implementation "com.google.firebase:firebase-iid:20.2.4"
implementation "com.google.firebase:firebase-iid:20.3.0"
implementation "com.google.firebase:firebase-auth:19.4.0"
implementation "com.google.firebase:firebase-crashlytics:17.2.1"
implementation "com.google.firebase:firebase-crashlytics:17.2.2"

/**
* Material UI
*/
implementation "com.google.android.material:material:1.3.0-alpha02"
implementation "com.google.android.material:material:1.3.0-alpha03"


/**
Expand All @@ -128,9 +138,10 @@ dependencies {
implementation "androidx.core:core-ktx:1.3.1"
implementation "androidx.activity:activity-ktx:1.2.0-alpha08"
implementation "androidx.fragment:fragment-ktx:1.3.0-alpha08"
implementation "androidx.core:core-ktx:1.3.2"
implementation "androidx.preference:preference-ktx:1.1.1"
implementation "androidx.paging:paging-common-ktx:3.0.0-alpha06"
implementation "androidx.paging:paging-runtime-ktx:3.0.0-alpha06"
implementation "androidx.paging:paging-common-ktx:3.0.0-alpha07"
implementation "androidx.paging:paging-runtime-ktx:3.0.0-alpha07"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.2.0"
implementation "androidx.lifecycle:lifecycle-livedata-core-ktx:2.2.0"
Expand All @@ -142,15 +153,15 @@ dependencies {
implementation "androidx.constraintlayout:constraintlayout:2.0.1"
implementation "androidx.appcompat:appcompat:1.2.0"
implementation "androidx.media:media:1.2.0"
implementation "androidx.recyclerview:recyclerview:1.2.0-alpha05"
implementation "androidx.recyclerview:recyclerview:1.2.0-alpha06"
implementation "androidx.cardview:cardview:1.0.0"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"

/**
* Google GMS libraries for login, location, and fitness data retrieval
*/
implementation "com.google.android.gms:play-services-auth:18.1.0"
implementation "com.google.android.gms:play-services-location:17.0.0"
implementation "com.google.android.gms:play-services-location:17.1.0"
implementation "com.google.android.gms:play-services-fitness:19.0.0"

/**
Expand All @@ -173,16 +184,16 @@ dependencies {
/**
* Moshi for jsonifing object
*/
implementation 'com.squareup.moshi:moshi:1.10.0'
implementation 'com.squareup.moshi:moshi-kotlin:1.10.0'
implementation 'com.squareup.moshi:moshi-adapters:1.10.0'
implementation 'com.squareup.moshi:moshi:1.11.0'
implementation 'com.squareup.moshi:moshi-kotlin:1.11.0'
implementation 'com.squareup.moshi:moshi-adapters:1.11.0'

/**
* Fuel for http connection
*/
implementation 'com.github.kittinunf.fuel:fuel:2.2.3'
implementation 'com.github.kittinunf.fuel:fuel-android:2.2.3'
implementation 'com.github.kittinunf.fuel:fuel-coroutines:2.2.3'
implementation 'com.github.kittinunf.fuel:fuel:2.3.0'
implementation 'com.github.kittinunf.fuel:fuel-android:2.3.0'
implementation 'com.github.kittinunf.fuel:fuel-coroutines:2.3.0'

/**
* rxJava 3.0.0 for reactive pattern
Expand All @@ -195,7 +206,7 @@ dependencies {
implementation "io.grpc:grpc-okhttp:1.32.1"
implementation "io.grpc:grpc-protobuf:1.32.1"
implementation 'io.grpc:grpc-stub:1.32.1'
implementation "io.grpc:grpc-kotlin-stub:0.1.5"
implementation 'io.grpc:grpc-kotlin-stub:0.2.0'


/**
Expand Down
8 changes: 4 additions & 4 deletions app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
},
"oauth_client": [
{
"client_id": "438290174407-mcl4dpbl0uskiafnoi8kg60jmgt46bv4.apps.googleusercontent.com",
"client_id": "438290174407-370q9iuk6qj22e3gu0c8p2vpg252bh9t.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "kaist.iclab.abclogger",
"certificate_hash": "b97a283b749c6f7e923da38b6842d932b93e703b"
"certificate_hash": "52a683125eceda0f09c5c473d21716f3774c63c1"
}
},
{
"client_id": "438290174407-volqd36slo8b9hs9v3tcsudlo3m0fsnq.apps.googleusercontent.com",
"client_id": "438290174407-24i7ekafng6a1ridnu3ranlj7ej8tr3v.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "kaist.iclab.abclogger",
"certificate_hash": "70f41fa902944b6d7caee8764ee8ea561c42d778"
"certificate_hash": "b97a283b749c6f7e923da38b6842d932b93e703b"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion app/grpc
Loading

0 comments on commit c9479ee

Please sign in to comment.