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

no non-static method "Landroid/media/MediaRecorder;.pause()V" #71

Closed
ghost opened this issue Sep 9, 2017 · 1 comment
Closed

no non-static method "Landroid/media/MediaRecorder;.pause()V" #71

ghost opened this issue Sep 9, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 9, 2017

ERROR Error: Uncaught (in promise): Error: java.lang.NoSuchMethodError: no non-static method "Landroid/media/MediaRecorder;.pause()V"

Any idea of what might be the problem ? Is it because that method was introduced in API level 24?

When I call this.recorder.start or this.recorder.stop It works. But with this.recorder.pause it throws that error.

@ghost
Copy link
Author

ghost commented Sep 14, 2017

It's working fine with another emulator. My problem was the Android emulator used an API older than 24.

In case anyone else without Android experience have the same problem here it's what I found. The pause method for Android MediaRecorder was introduced in API 24. That means that , the Android SDK you are using to build the application and the phone(emulator) , both have to support that API level or newer. I guess, would need to check at runtime the version of Android in which the app is running, and then show the pause button only if supported.

@ghost ghost closed this as completed Sep 14, 2017
This issue was closed.
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

0 participants