Skip to content
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

Not compatible with workmanager if the microphone is open #87

Open
fobeid1 opened this issue Oct 26, 2023 · 0 comments
Open

Not compatible with workmanager if the microphone is open #87

fobeid1 opened this issue Oct 26, 2023 · 0 comments

Comments

@fobeid1
Copy link

fobeid1 commented Oct 26, 2023

ERROR :: AndroidRuntime(16220): java.lang.NullPointerException: Attempt to invoke virtual method 'int android.media.AudioRecord.read(byte[], int, int)' on a null object reference
ERROR :: AndroidRuntime(16220): at com.code.aaron.micstream.MicStreamPlugin$1.run(MicStreamPlugin.java:132)
ERROR :: AndroidRuntime(16220): at java.lang.Thread.run(Thread.java:1012)

When executeTask by Workmanager while the recorder is running, the Workmanager activate the 'onDetachedFromEngine' function that call 'onCancel' when executeTask

@Override

public void onDetachedFromEngine(FlutterPluginBinding binding) {
// TODO not call :: onCancel(null);
// replace it with a new 'dispose' function that called by onMethodCall
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant