Coder Social home page Coder Social logo

opentrace-community / opentrace-android Goto Github PK

View Code? Open in Web Editor NEW
576.0 49.0 226.0 849 KB

OpenTrace Android app. Reference implementation of the BlueTrace protocol.

Home Page: https://bluetrace.io

License: GNU General Public License v3.0

Kotlin 100.00%

opentrace-android's Introduction

OpenTrace Android app

alt text

OpenTrace is the open source reference implementation of BlueTrace. BlueTrace is a privacy-preserving protocol for community-driven contact tracing across borders. It allows participating devices to log Bluetooth encounters with each other, in order to facilitate epidemiological contact tracing while protecting users’ personal data and privacy. Visit https://bluetrace.io to learn more. The OpenTrace reference implementation comprises:

Setup of the app

To get started on the app, setup and configure the following:

  1. ./gradle.properties
  2. ./app/build.gradle
  3. Firebase - google-services.json
  4. Remote configs
  5. Protocol version

Configs in gradle.properties

Sample Configuration

ORG="SG_OTC"
STORE_URL="<Play store URL>"
PRIVACY_URL="<Privacy policy 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 = "<Your 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"

android.useAndroidX=true
android.enableJetifier=true

ORG: For international federation usage

To obtain the official BlueTrace Service ID and Characteristic ID, please email [email protected]


Build Configurations in build.gradle

Change the package name and other configurations accordingly such as the resValue in in the different settings in buildTypes For example,

buildTypes {
    debug {
            buildConfigField "String", "FIREBASE_UPLOAD_BUCKET", STAGING_FIREBASE_UPLOAD_BUCKET
            buildConfigField "String", "BLE_SSID", STAGING_SERVICE_UUID

            String ssid = STAGING_SERVICE_UUID
            versionNameSuffix "-debug-${getGitHash()}-${ssid.substring(ssid.length() - 5,ssid.length() - 1 )}"
            resValue "string", "app_name", "OpenTrace Debug"
            applicationIdSuffix "stg"
        }

Values such as STAGING_FIREBASE_UPLOAD_BUCKET, STAGING_SERVICE_UUID have been defined in gradle.properties as described above.


Firebase and google-services.json

Setup Firebase for the different environment. Download the google-services.json for each of the environments and put it in the corresponding folder.

Debug: ./app/src/debug/google-services.json

Production: ./app/src/release/google-services.json

The app currently relies on Firebase Functions to work. More information can be obtained by referring to opentrace-cloud-functions.


Remote Config

Remote config is used for retrieving the "Share" message used in the app. The key for it is "ShareText". If it is unable to be retrieved, it falls back to R.string.share_message


Protocol Version

Protocol version used should be 2 (or above) Version 1 of the protocol has been deprecated


Security Enhancements

SSL pinning is not included as part of the repo. It is recommended to add in a check for SSL certificate returned by the backend.


Statement from Google

The following is a statement from Google: "At Google Play we take our responsibility to provide accurate and relevant information for our users very seriously. For that reason, we are currently only approving apps that reference COVID-19 or related terms in their store listing if the app is published, commissioned, or authorized by an official government entity or public health organization, and the app does not contain any monetization mechanisms such as ads, in-app products, or in-app donations. This includes references in places such as the app title, description, release notes, or screenshots. For more information visit https://android-developers.googleblog.com/2020/04/google-play-updates-and-information.html"


Acknowledgements

OpenTrace uses the following third party libraries / tools.


ChangeLog

1.0.2

  • Fixed an issue in GattServer.kt where the cached readPayLoad is not cleared properly in some cases
  • Removed Firebase Analytics

1.0.1

  • Updated readme.md to add in two more fields for setup

1.0.0

  • First release of this repo

opentrace-android's People

Contributors

slxe6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opentrace-android's Issues

E/libc: Access denied finding property "hwservicemanager.ready"

Giving Error after clicking on Get OTP.

2020-04-17 19:08:37.747 6662-6662/? E/.miui.analytic: Not starting debugger since process cannot load the jdwp agent.
2020-04-17 19:08:38.031 2829-2845/? E/libc: Access denied finding property "hwservicemanager.ready"
2020-04-17 19:08:38.032 2829-2845/? E/libc: Access denied finding property "hwservicemanager.ready"
2020-04-17 19:08:38.131 630-699/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2020-04-17 19:08:38.227 15731-15731/? E/Launcher: changeViewByFsGestureState, view=ShortcutMenuLayer, alpha=0.0, scale=1.0
2020-04-17 19:08:39.032 2829-2845/? E/libc: Access denied finding property "hwservicemanager.ready"
2020-04-17 19:08:39.033 2829-2845/? E/libc: Access denied finding property "hwservicemanager.ready"
2020-04-17 19:08:39.160 630-699/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2020-04-17 19:08:39.230 15175-27811/? E/ActivityManager: applyOptionsLocked: Unknown animationType=0
2020-04-17 19:08:39.640 15731-15731/? E/Launcher: changeViewByFsGestureState, view=ShortcutMenuLayer, alpha=1.0, scale=1.0
2020-04-17 19:08:40.034 2829-2845/? E/libc: Access denied finding property "hwservicemanager.ready"
2020-04-17 19:08:40.035 2829-2845/? E/libc: Access denied finding property "hwservicemanager.ready"
2020-04-17 19:08:41.034 2829-2845/? E/libc: Access denied finding property "hwservicemanager.ready"
2020-04-17 19:08:41.035 2829-2845/? E/libc: Access denied finding property "hwservicemanager.ready"
2020-04-17 19:08:42.036 2829-2845/? E/libc: Access denied finding property "hwservicemanager.ready"
2020-04-17 19:08:42.037 2829-2845/? E/libc: Access denied finding property "hwservicemanager.ready"
2020-04-17 19:08:42.669 16331-14920/? E/Volley: [3546] BasicNetwork.performRequest: Unexpected response code 400 for https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?alt=proto&key=AIzaSyA1u3USlmwErel8sdqEhMY96DKxubwrKew
2020-04-17 19:08:42.725 6742-6742/? E/ite.xiaomi:ski: Not starting debugger since process cannot load the jdwp agent.

1587130657440

How does this solve scanning while the device is asleep?

Hi, I'm struggling to understand how your implementation manages scanning while in background. There is no wakelock and the repeated scan scheduling is implemented via simple handler messages. To my understanding this won't work when the device goes into sleep.
I now work on a similar app and we solve theses problems by keeping the device awake as we really want to make sure the scanning works continuously and reliably. Obviously it comes with some extra battery drain. That's why I'm trying to understand how you cope with this and if perhaps continuous scanning proved itself as not necessary.

Android device didn't find ios device

Hi there,
I was config android and ios app. I had records in firebase with upload data from ios and android app. But Android device just have android's records. Ios device just have ios's records.
Please help me.
Thank all!

Support for "external" Bluetooth Low Energy hardware

Hi all,

A silly thought… I have an older mobile device which is too old to run OpenTrace (or its "branded" variants, TraceTogether, COVIDSafe…) on a count of its OS (Android 4.1) and its hardware (Bluetooth 3.0 radio). It's not worth me buying a new phone just to run this application, however, it would seem BLE-capable microcontrollers (e.g. ESP32, nRF52832, nRF52840) are cheap and readily available.

I had a quick read of the BlueTrace whitepaper, and I suspect it might be possible to "cleave" OpenTrace into two parts: the phone app that talks with the "cloud" server, and the radio part that does the BLE handshakes.

The thinking is we could make a hardware device that, independently of the phone, manages the contact tracing functions (thus neatly side-stepping problems like issue #31), and either just connects to the Internet via the phone in WiFi hot-spot mode, connects to the Internet via the phone using Bluetooth LAP (for real old non-Android "feature" phones) or periodically connects to the phone app via Bluetooth RFCOMM.

If a firmware for commonly available BLE dev boards could be developed, these could be packaged and made available during this COVID-19 crisis, then once everything's over, those boards then sold onto the maker community to be re-purposed.

I have a couple of Nordic nRF52840 dev boards kicking around as well as an ESP32 board (Adafruit module if I recall correctly), there's a old phone (ZTE T84) with a dickey battery that I can perhaps try running OpenTrace on for interoperability checks and I'll look into getting a test set-up going with the "cloud" server.

I'd love to hear from others who'd be interested in assisting with this.

Regards,
Stuart Longland

How to decrypt MSG

Hello,

i have an issue decrypting the msg attribute once it's stored. i want to decrypted once i get the records in firestore.

Thanks

How to test if its working?

I have just installed the application on an android phone, how do I test if the application's bluetooth feature is working? Can I test with TraceTogether application found on playstore or must both applications be installed from github.

OTP is correct and the time is not expired. It still shows the code has expired

  1. Before entering the OPT the message shows "Verification failed. Please try again"

  2. Then after entering the OTP, message shows "Wrong OTP entered"

Execption I get at console- com.google.firebase.auth.FirebaseAuthInvalidCredentialsException: The sms code has expired. Please re-send the verification code to try again. -ERROR_SESSION_EXPIRED

Wrong OTP entered and OTP expired on debug lofs

Hi Guys,
When I try to register the app I get wrong OTP, I am 100% I type it right and when I look at debug logs O get the message below:

 com.google.firebase.auth.FirebaseAuthInvalidCredentialsException: The sms code has expired. Please re-send the verification code to try again.
        at com.google.firebase.auth.api.internal.zzdv.zza(com.google.firebase:firebase-auth@@19.2.0:30)

Can you please assist or I am missing something.
Thanks,
Jongi

android configuration

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.

SMS not received from firebase for phone authentication

Hi,

First of all, I'd like to thank all the contributors to the discussion and specially the Gov of Singapore for publishing OpenTrace open source.

I've gone through all the README.md both for OpenTrace Android and OpenTrace-cloud-functions.

1 - npm --prefix functions test works fine

config.ts
#encryption
√ should have a valid default algorithm
#encryption
√ should succeed in getting encryption key (880ms)
#upload
√ should have valid buckets (829ms)
#upload
√ should use a good pin generator

4 passing (2s)

2 - firebase deploy --only functions works also fine

  • functions: Finished running predeploy script.
    i functions: ensuring required API cloudfunctions.googleapis.com is enabled...

  • functions: required API cloudfunctions.googleapis.com is enabled
    i functions: preparing functions directory for uploading...
    i functions: packaged functions (109.19 KB) for uploading

  • functions: functions folder uploaded successfully
    i functions: creating Node.js 10 function getHandshakePin(europe-west2)...
    i functions: creating Node.js 10 function getTempIDs(europe-west2)...
    i functions: creating Node.js 10 function getUploadToken(europe-west2)...
    i functions: creating Node.js 10 function processUploadedData(europe-west2)...

  • functions[getTempIDs(europe-west2)]: Successful create operation.

  • functions[getUploadToken(europe-west2)]: Successful create operation.

  • functions[getHandshakePin(europe-west2)]: Successful create operation.

  • functions[processUploadedData(europe-west2)]: Successful create operation.

  • Deploy complete!

My trouble when starting to test Opentrace :
After entering the phone number for registration. My device does not receive the SMS code from firebase.
I've enabled Phone authentication and put the SHA-1 as necessary..

Still no SMS has been sent from firebase.

When I tested with whitelisted phone numbers, I can register.

Could someone tell me what could be the missing point here ?

Thanks for your helps

Undocumented settings / config

In the readme, you mention:

STAGING_SERVICE_UUID = "17E033D3-490E-4BC9-9FE8-2F567643F4D3"
V2_CHARACTERISTIC_ID = "117BDD58-57CE-4E7A-8E87-7CCCDDA2A804"

What do these two variables stand for exactly? It's not clear to me what values I should set for my app.

Thanks.

Bluetooth services

Hey, is it possible to use the bluetooth feature of the application without the cloud functions? Will the Bluetooth feature where one device running open source openTrace and another device running TraceTogether from the playstore be able to communicate and log their encounter?

Possible GPLv3 license violation by COVIDSafe App?

The Australian Government has released the source code for their COVIDSafe app which looks based around OpenTrace's source code, but I can't find the GPLv3 license in their repository and their license seems to violate clauses in the GPL? Can anyone with more knowledge comment on this? The COVIDSafe repositories can be found here.

OTP imple

OTP implementation in this module through firebase, easiest method.

Year 2038 problem

I observed from the white paper and TemporaryID that the startTime and expiryTime are effectively 4 bytes, i.e. Unix time (seconds).

Since this will overflow on 19 January 2038 (18 years later!), if we want BlueTrace to still be used during pandemics then, we should fix this and use 8 bytes instead.

StreetPassRecords Always Empty when uploaded

I am trying to set-up the whole project. Whenever I upload the data from one device keeping another device beside for a while, this is uploading an empty array of street pass records. To. be exact, none of the overridden methods of BluetoothGattServerCallback is getting invoked. Am I missing any steps? Thanks

opt issue

from the debug screen.. i am getting this message when testing for the OTP
anyone can help please.
D/OnboardingActivity: NOT-IDLE signInWithCredential:success
D/TempIDManager: NOT-IDLE [TempID] Error getting Temporary IDs
D/OnboardingActivity: NOT-IDLE Retrieved Temporary ID successfully
W/Utils: NOT-IDLE get handshake pin (failure): NOT_FOUND
E/OnboardingActivity: NOT-IDLE Failed to retrieve HandShakePin NOT_FOUND
I/PhoneAuthProvider: Sms auto retrieval timed-out.

Decrypt msg to uid

We have shared a reference implementation for processUploadedData, you can find the logic to decrypt exchanged messages to uid here:

https://github.com/opentrace-community/opentrace-cloud-functions/blob/master/functions/src/opentrace/processUploadedData.ts#L104

not able to understand how to use logic
how to get uid or mobile no. from street past record>msg, or how to decrypt encrypted msg

Sure. There's a file called CustomEncrypter.ts with a decryptTempID, you can find more decryptions. you can look there and i'm sure you are going to find a solution

Originally posted by @ie76 in #13 (comment)

how to call that and put msg argument, do i need to do it from command line from cloud function directory in my local machine
or from the firebase test section

Originally posted by @sudoharish in opentrace-community/opentrace-cloud-functions#36 (comment)

Why using a BLE manufacturer ID assigned to a private company?

In io.bluetrace.opentrace.bluetooth.BLEAdvertiser.kt, the following code builds the AdvertiseData which a manufacturer ID = 1023 and 3 bytes of random manufacturer specific data.

val randomUUID = UUID.randomUUID().toString()
val finalString = randomUUID.substring(randomUUID.length - charLength, randomUUID.length)
CentralLog.d(TAG, "Unique string: $finalString")
val serviceDataByteArray = finalString.toByteArray()

data = AdvertiseData.Builder()
.setIncludeDeviceName(false)
.setIncludeTxPowerLevel(true)
.addServiceUuid(pUuid)
.addManufacturerData(1023, serviceDataByteArray)
.build()

The Manufacturer ID 1023 seems to be assigned to a company called Withings (www.withings.com), according to https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/

Would this cause any legal issue with Withings?

Thanks,
Yuan Huang

@slxe6

Verification failed: Failed to retrieve HandShakePin NOT_FOUND

Hi Guys,
This application fail to verify and below is my debug long:

2020-04-12 15:18:53.215 16812-16812/net.za.jongi.masiphandisane D/OnboardingActivity:  NOT-IDLE Retrieved Temporary ID successfully
2020-04-12 15:18:53.611 16812-16812/net.za.jongi.masiphandisane W/Utils:  NOT-IDLE get handshake pin (failure): NOT_FOUND
2020-04-12 15:18:53.620 16812-16812/net.za.jongi.masiphandisane E/OnboardingActivity:  NOT-IDLE Failed to retrieve HandShakePin NOT_FOUND

Please let me know what I am missing.
Thanks,
Jongi

Invalid Pin on upload section

I get invalid pin when a put the pin for upload. I use storeUploadCodes() to store the pin and i can see in firestore the
Crypted code but when i enter it in the app it still write invalid pin. I changed the format date to 'yyyyMMdd' under uploadToCloudStorage in EnterPinFragment.kt but i still get invalid pin.

Records and Status is always empty

I am able to register & upload data on the Firebase storage, the problem I am facing is records & status is always empty in json file.
{"records":[],"events":[],"token":"XXXXXX"}

How am I testing the app:
I have installed the application on 3 devices, registered and kept device bluetooth on, on all the devices, after 20-30 minutes I uploaded the data from all 3 devices and all 3 json files has empty data. ({"records":[],"events":[],"token":"XXXXXX"})

I debugged the application while uploading and found database is empty, I don't see any errors also in logcat.

Generated 3 UUID using https://www.uuidgenerator.net/version1 and configure for below properties:
STAGING_SERVICE_UUID
V2_CHARACTERISTIC_ID
PRODUCTION_SERVICE_UUID

can anyone suggest what should be the issue? Thanks.

-Naresh

Gradle sync failed Could not get unknown property 'STORE_URL'

Hello,

I start building the android application using Android studio and i got the following error :
4/19/20
9:59 PM Gradle sync started

9:59 PM Gradle sync failed: Could not get unknown property 'STORE_URL' for DefaultConfig_Decorated{name=main, dimension=null, minSdkVersion=DefaultApiVersion{mApiLevel=22, mCodename='null'}, targetSdkVersion=DefaultApiVersion{mApiLevel=29, mCodename='null'}, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, renderscriptNdkModeEnabled=null, versionCode=41, versionName=1.0.41, applicationId=io.bluetrace.opentrace, testApplicationId=null, testInstrumentationRunner=androidx.test.runner.AndroidJUnitRunner, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=null, mBuildConfigFields={GITHASH=com.android.builder.internal.ClassFieldImpl@f362edee}, mResValues={build_config_package=com.android.builder.internal.ClassFieldImpl@78503f26}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}, mWearAppUnbundled=null} of type com.android.build.gradle.internal.dsl.Defaul... (show balloon)

It looks like the 2 variables store URL and PRIVACY URL are not correctly configured could you please help?
I'm new in the Android studio if you can share a wiki I could use to generate debug and release versio

Invalid PIN on trying to upload data

Thanks for the good work.

Whenever I try to upload data I get an invalid pin error message.

I have followed all the cloud functions instructions and the tests all run successfully.

Please kindly advise what I might be missing

npm issue

I have a issue at below step :
opentrace-cloud-functions>npm --prefix functions install
npm ERR! Can't install : Missing package version

Could you pls help me on this?

NOT able to verify OTP.

Not able to go After verify screen.
Please help.
Error :-
2020-04-17 22:12:48.903 26483-26483/io.bluetrace.opentrace.stg D/OTPFragment: NOT-IDLE OnButtonClick 3B 2020-04-17 22:12:48.920 26483-26483/io.bluetrace.opentrace.stg I/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzaq@90c7e82 2020-04-17 22:12:52.751 26483-26504/io.bluetrace.opentrace.stg D/FirebaseAuth: Notifying id token listeners about user ( 5zJ2oVQxZMYyI7BDpKOOCKshsP02 ). 2020-04-17 22:12:52.752 26483-26504/io.bluetrace.opentrace.stg D/FirebaseAuth: Notifying auth state listeners about user ( 5zJ2oVQxZMYyI7BDpKOOCKshsP02 ). 2020-04-17 22:12:52.762 26483-26483/io.bluetrace.opentrace.stg D/OnboardingActivity: NOT-IDLE signInWithCredential:success 2020-04-17 22:12:52.802 26483-26483/io.bluetrace.opentrace.stg D/TempIDManager: NOT-IDLE [TempID] Error getting Temporary IDs 2020-04-17 22:12:52.806 26483-26483/io.bluetrace.opentrace.stg D/OnboardingActivity: NOT-IDLE Retrieved Temporary ID successfully 2020-04-17 22:12:52.814 26483-26483/io.bluetrace.opentrace.stg W/Utils: NOT-IDLE get handshake pin (failure): Invalid URL host: "<Your Firebase region>-opentrace-b01d4.cloudfunctions.net" 2020-04-17 22:12:52.818 26483-26483/io.bluetrace.opentrace.stg E/OnboardingActivity: NOT-IDLE Failed to retrieve HandShakePin Invalid URL host: "<Your Firebase region>-opentrace-b01d4.cloudfunctions.net" 2020-04-17 22:13:36.908 26483-26483/io.bluetrace.opentrace.stg I/PhoneAuthProvider: Sms auto retrieval timed-out.

error

Tracing is unreliable once the phone is in your pocket

Ok, so my apologies if this is not correct, I have not yet read all of your code BUT...

Based on my quick look at your manifest and what I saw with setting up background tasks I don't think you will be able to get the Android version of your application to scan consistently. When Android puts the app into Doze mode your alarm manager won't wake up the app to scan. You can fix that and you can scan at any frequency you want using Alarm Manager even when the application has been killed or the handset has been 'Dozed'. Here's the basics:

add.. to your manifest.

Don't use Alarm manager to schedule a repeating task. Instead, use it to schedule one task at a time with a delay, BUT in the task, schedule the next task. Also in the broadcast receiver you'll need to take the wake lock. I'm going to take a more careful look at your code later today. Please let me know if you would like help fixing this; I've already implemented it this way in our social distance app and it will work here too.

--aaron

Storage Exception while uploading data

I'm getting the following exception inspite of getUploadToken running successfully.

E/StorageException: StorageException has occurred.
User does not have permission to access this object.
Code: -13021 HttpResult: 403
E/StorageException: The server has terminated the upload session

What am I missing?

Activity class {io.bluetrace.opentrace.stg/io.bluetrace.opentrace.SplashActivity} does not exist.

Hi Guys,
The App fails to startup on AVD, although works fine from my phone except I can't pass the part I pout my number to wait for OTP, it fails with message below:

04/10 20:30:46: Launching 'app' on Pixel 2 API 28.
$ adb shell am start -n "io.bluetrace.opentrace.stg/io.bluetrace.opentrace.SplashActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while executing: am start -n "io.bluetrace.opentrace.stg/io.bluetrace.opentrace.SplashActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=io.bluetrace.opentrace.stg/io.bluetrace.opentrace.SplashActivity }
Error type 3
Error: Activity class {io.bluetrace.opentrace.stg/io.bluetrace.opentrace.SplashActivity} does not exist.

Error while Launching activity

I am also failing to register, after putting my phone number, it doesn't go anywhere plus there are no error messages. Am I missing something.
Thanks you,
Jongi

[urgent] CVE-2020-12856

This CVE is known to exist in OpenTrace and all forks. It has been assigned a severity of 9.2 Critical. It primarily affects Android but should also be addressed on iPhone.

See https://github.com/alwentiu/COVIDSafe-CVE-2020-12856 for more information.

The details are not currently public and are under embargo until June 19, however we have emailed the full details to [email protected] and [email protected] on May 19 and again on May 27 including details of a suggested fix, but have not heard any reply or acknowledgement.

Please contact us for more information if necessary, but additionally please provide an advisory so that other projects forking OpenTrace do can also be aware of how to address this.

cc @alwentiu

Unsupported Modules Detected

Unsupported Modules Detected: Compilation is not supported for following modules: opentrace-android. Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project.

Task :app:processDebugGoogleServices FAILED

i have successfully tested
1)cloud function part,
2) in sample gradle.properties file as per doc just changed the region to my firebase storage region. 3)created the service.json file from firebase and paste it into the app/debug folder in android studio then synced,
then i got below errors, do i need to do anything more, is it mandatory to have android dev account for testing purposes.

_> Task :app:processDebugGoogleServices FAILED
Parsing json file: C:\Users\Harish\StudioProjects\opentrace-android\app\src\debug\google-services.json

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'io.bluetrace.opentrace.stg'_

app_error

Invalid Code

Hi, can you guide me based on this error?

D/UploadFragment: records: []
status: []
D/UploadFragment: NOT-IDLE Invalid code

Gradle throws errors

gradle

FAILURE: Build failed with an exception.

  • Where:
    Build file '/Users/satyaakam/opentrace-android/app/build.gradle' line: 50

  • What went wrong:
    A problem occurred evaluating project ':app'.

Could not get unknown property 'STORE_URL' for DefaultConfig_Decorated{name=main, dimension=null, minSdkVersion=DefaultApiVersion{mApiLevel=22, mCodename='null'}, targetSdkVersion=DefaultApiVersion{mApiLevel=29, mCodename='null'}, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, renderscriptNdkModeEnabled=null, versionCode=41, versionName=1.0.41, applicationId=io.bluetrace.opentrace, testApplicationId=null, testInstrumentationRunner=androidx.test.runner.AndroidJUnitRunner, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=null, mBuildConfigFields={GITHASH=com.android.builder.internal.ClassFieldImpl@f362edee}, mResValues={build_config_package=com.android.builder.internal.ClassFieldImpl@78503f26}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}, mWearAppUnbundled=null} of type com.android.build.gradle.internal.dsl.DefaultConfig.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2.2/userguide/command_line_interface.html#sec:command_line_warnings

Bluetooth permission and enabling

Is the permission for Bluetooth taken only once and Bluetooth is enabled for all times unless permission revoked?
Is there a way to ask for Bluetooth permission once and if allowed by user, then enable Bluetooth at regular intervals without asking again and again?

Can not get txPower value

I tried to get txPower in onScanResult(callbackType: Int, result: ScanResult?) callback but the value alway is TX_POWER_NOT_PRESENT (127)

May I do anything in wrong way?

f-droid.org repository

It would be great if opentrace would be in the f-droid repository. It similar to google play, but only contains freesoftware (like opentrace is).

No physical device

Hi Everyone,

I currently dont have a physical device and was setting up just using android studio. Given the importance of bluetooth this was an immediate show stopper during setup (I made it past the otp screen after setting up in firebase).
I have tried launching the app using an android image on virtual box but again i am having issues with bluetooth. In both cases after the OTP screen where i am asked to give permission to access bluetooth the app resets to first screen.
Has anybody been able to work with the app without a physical device? If so what was your setup?

Thanks

No communications happen between an Android phone and iOS phone running the app

I have managed to build the application on both Android and iOS. The app is running on two iPhones and two Android phones. The two iPhones communicate with each other through Bluetooth and so do the Android phones, however, I haven't been able to see any records for communication between any of the iPhones with any of the Android phones. Am I missing anything here? Is there any specific configuration that needs to be the same on both builds? Is that communication not possible by design, at all? U can provide further information about the two builds upon request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.