Closed iNima closed 4 years ago
Hi Nima,
Thanks for reporting the issue, 0.5.4
should be ok.
I don't know why the crash happens in com.zeno.flutter_audio_recorder.FlutterAudioRecorderPlugin.onRequestPermissionsResult(FlutterAudioRecorderPlugin.java:82) although I didn't even import it in my class file!
After done some troubleshooting, It's quite interesting that I found that Flutter will register all the plugins for us after we install any new plugins(even without use them like you mentioned in the first post). ( you could find the Registrant in ./Android/app/src/main/java/io.flutter.plugins/GeneratedPluginRegistrant
).
And the permission result callback in Android was registered along with the plugin(but this situation was not handled correctly in 0.5.3
), that's why this issue was introduced.
Thanks Nik
Thanks @nikli2009 At the moment I switched to another plugin because of supporting aac on Android. By the way, thanks for fixing this issue.
Hi there,
I added the required permission in the AndroidManifest file but in my app I'm also using the camera plugin. So, as soon as the camera is initiated it askes two permissions. 1- access to camera 2- access to audio recording via mic
When I allow permission the app crashes. It happens even when I don't use flutter_audio_recorder at all, only adding the plugin in the pubspec.yaml is enough to see this exception when we allow permissions:
I don't know why the crash happens in
com.zeno.flutter_audio_recorder.FlutterAudioRecorderPlugin.onRequestPermissionsResult(FlutterAudioRecorderPlugin.java:82)
although I didn't even import it in my class file!(It works correctly on iOS by the way)