onnela-lab / beiwe-android

Beiwe is a smartphone-based digital phenotyping research platform. This is the Beiwe Android app code. The Beiwe2 app is also available on the Google Play store to use with open source builds of the Beiwe backend.
https://www.beiwe.org/
BSD 3-Clause "New" or "Revised" License
26 stars 16 forks source link

Ambient audio has a condition that can crash the app when you open it. #74

Closed biblicabeebli closed 1 month ago

biblicabeebli commented 9 months ago
        if (instantiated && mRecorder != null) {
            mRecorder!!.stop()  //FIXME this line can crash with an illegal state exception
            mRecorder!!.reset()
            mRecorder!!.release()
            EncryptAmbientAudioFileTask().execute()  // executes on a thread and then starts a new recording
        }
biblicabeebli commented 9 months ago

Fixed a DIFFERENT bug on android 8....

biblicabeebli commented 1 month ago

Due to the state of ambient/background audio recording we have decided to remove the feature entirely. It was too unreliable and Android fights against it with permissions changes starting at-latest in android 12.