-
Notifications
You must be signed in to change notification settings - Fork 67
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
Keep microphone alive in background when other audio app open #47
Comments
This plugin does not interfere in the life cycle management of apps. As long as the mobile operating system does not suspend an app recording audio, the app should keep on recording. Note that the example application does pause recording because it has been designed to do so, by explicitly managing the life cycle of apps: example/lib/main.dart#L261-L285 Also note that other apps may potentially interfere with the recording process; this is outside of control for this plugin. |
I recommend you to try it out by cloning this repository, removing every line from function void didChangeAppLifecycleState(AppLifecycleState state) {} and then check if the app keeps on recording or not by looking at the log. If you do encounter issues, please reopen this issue with concrete information about what happened. |
Hello @anarchuser Thanks for you answer. According to the doc: I think it's because I have an interruption because: So I want to level up the audio session priority. I have a crash: mic_stream/SwiftMicStreamPlugin.swift:76: Fatal error: Unexpectedly found nil while unwrapping an Optional value
* thread #1, queue = 'com.apple.main-thread', stop reason = Fatal error: Unexpectedly found nil while unwrapping an Optional value
frame #0: 0x0000000189be83d4 libswiftCore.dylib`_swift_runtime_on_report I think it's because we don't have this value in the enum even if there is in dart side. Edit:
|
Thank you for your detailed report. |
I will have a look at the issue but it is unlikely that I am able to fix this. If you want, please have a look at the issue and try to fix it yourself. I am happy to provide my support and, if you do manage to fix it, integrate it into the plugin. |
Hello,
I really like this package and his simplicity.
In my app, I wanna to be able to keep listenning in background even if another app like Youtube is open.
I see that some app who use microphone (like SleepCycle) is keeping the microphone alive in background even if the user open Youtube app.
So it's shoud be possible to do that in Flutter.
Regards,
The text was updated successfully, but these errors were encountered: