-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: release mic from audio component #1974
fix: release mic from audio component #1974
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1974 +/- ##
=============================================
+ Coverage 38.49% 38.50% +0.01%
Complexity 892 892
=============================================
Files 287 287
Lines 11313 11315 +2
Branches 1449 1449
=============================================
+ Hits 4355 4357 +2
Misses 6530 6530
Partials 428 428
Continue to review full report in Codecov by Sentry.
|
Build (beta-debug) available here. Scroll down to Artifacts! |
Build (dev-debug) available here. Scroll down to Artifacts! |
Build 520 succeeded. The build produced the following APK's: |
@@ -241,6 +241,7 @@ class RecordAudioViewModel @Inject constructor( | |||
|
|||
override fun onCleared() { | |||
super.onCleared() | |||
stopRecording() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it won't stop recording when you navigate to another screen because in such situation current one is kept in the back stack and its ViewModel is not destroyed so onCleared
isn't called. It will only happen when we close the screen and remove it from the back stack, so for instance when navigating back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I have moved it to onDispose
on lifecycle observer in the View Component as we talked.
Build (dev-debug) available here. Scroll down to Artifacts! |
Build (beta-debug) available here. Scroll down to Artifacts! |
Build (beta-debug) available here. Scroll down to Artifacts! |
Build (dev-debug) available here. Scroll down to Artifacts! |
Build 528 succeeded. The build produced the following APK's: |
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
If user is removed from the group or any other action that disabled the user to manually stop the recording audio, the microphone would stay on.
Solutions
Now on
onDispose
of Audio Recording Component we are also callingstopRecording
to fully release device microphone