opentrace-community / opentrace-android

OpenTrace Android app. Reference implementation of the BlueTrace protocol.
https://bluetrace.io
GNU General Public License v3.0
577 stars 225 forks source link

android configuration #58

Open evaei opened 4 years ago

evaei commented 4 years ago

Hi, for Configs in gradle.properties in sample Configuration we don't understand how to obtain the information. Could you please explain what is the value, that highlight and how to get the value from Firebase

ORG="SG_OTC" STORE_URL="" PRIVACY_URL=""

SERVICE_FOREGROUND_NOTIFICATION_ID=771579 
SERVICE_FOREGROUND_CHANNEL_ID="OpenTrace Updates"
SERVICE_FOREGROUND_CHANNEL_NAME="OpenTrace Foreground Service"

PUSH_NOTIFICATION_ID=771578
PUSH_NOTIFICATION_CHANNEL_NAME="OpenTrace Notifications"

service configurations

SCAN_DURATION=8000 MIN_SCAN_INTERVAL=36000 MAX_SCAN_INTERVAL=43000

ADVERTISING_DURATION=180000 ADVERTISING_INTERVAL=5000

PURGE_INTERVAL=86400000 PURGE_TTL=1814400000 MAX_QUEUE_TIME=7000 BM_CHECK_INTERVAL=540000 HEALTH_CHECK_INTERVAL=900000 CONNECTION_TIMEOUT=6000 BLACKLIST_DURATION=100000

FIREBASE_REGION = ""

STAGING_FIREBASE_UPLOAD_BUCKET = "opentrace-app-staging"
STAGING_SERVICE_UUID = "17E033D3-490E-4BC9-9FE8-2F567643F4D3"

V2_CHARACTERISTIC_ID = "117BDD58-57CE-4E7A-8E87-7CCCDDA2A804"

PRODUCTION_FIREBASE_UPLOAD_BUCKET = "opentrace-app"
PRODUCTION_SERVICE_UUID = "B82AB3FC-1595-4F6A-80F0-FE094CC218F9"

and In getUploadToken method why need to upload code what upload code stand for ? also how we collect data that user upload for us.

Thank you so much.

Sinapse87 commented 4 years ago

Hi, you need to create your own backend. For openTrace specifically, you need to create a project on firebase and download the config files in your project.

alexissinglaire commented 4 years ago

@evaei : from the gradle.properties file, following is the parameter that you need to configure to adjust with your testing environment

FIREBASE_REGION = "" STAGING_FIREBASE_UPLOAD_BUCKET = "opentrace-app-staging"

as for other parameter, you only apply when comes to your production environment, PRODUCTION_FIREBASE_UPLOAD_BUCKET = "opentrace-app"

To get the info for those parameters you need to setup the firebase project in GCP backend as explained by @Sinapse87

I suggest you familiarized yourself with Firebase in GCP so you can understand how it works before you can start with this opentrace project.

here are some links that good for beginner: https://fireship.io/lessons/the-ultimate-beginners-guide-to-firebase/ https://firebase.google.com/docs/android/setup