You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[v] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.16299.15], locale en-US)
• Flutter version 1.12.13+hotfix.5 at C:\flutter
• Framework revision 27321ebbad (6 weeks ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0
[v] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\BANONAS\AppData\Local\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.
[v] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[v] VS Code (version 1.41.1)
• VS Code at C:\Users\BANONAS\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.7.1
[v] Connected device (2 available)
• SM G9250 • 02157df25d9bbb0c • android-arm64 • Android 7.0 (API 24)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
On tap of record, recorder should start recording in the Android side. While recording, some added logs to check if recorder is running should show. channel.invokeMethod("updateRecorderProgress", json.toString()); should be called every tick.
Actual behavior
On tap of record, the recorder starts. Logs do show. It's assumed that channel.invokeMethod("updateRecorderProgress", json.toString()); is called. In the flutter side however, channel's methodCallHandler doesn't trigger.
Tested environment (Emulator? Real Device?)
Emulators with Android SDK 28 and 29
Samsung Galaxy S6 Edge (Android version 7.0)
Steps to reproduce the behavior
I've tried the example, and I've tried using flutter_sound in isolation, and flutter sound works well with no hiccups. When integrating with my project though, it doesn't work. My guess is it might clash with other dependencies?
I've found a solution, but I'm not too sure why it works: Registrar reg and MethodChannel channel should not be static. These are my changes to the code:
Again, not so sure why using statics messes it up. I tried this solution because channel of channel.invokeMethod might have a different value for channel, so invokeMethod might be calling a different method handler in the flutter side.
I hope this change could be implemented, it's quite the big blocker :( Thank you so much!
I guess this is why the flutter team provided such migration as @bsutton stated in #203. I'll update the code and release this in 2.0.3. Thanks for sharing.
Version of flutter_sound
2.0.1
flutter doctor
[v] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.16299.15], locale en-US)
• Flutter version 1.12.13+hotfix.5 at C:\flutter
• Framework revision 27321ebbad (6 weeks ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0
[v] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\BANONAS\AppData\Local\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.
[v] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[v] VS Code (version 1.41.1)
• VS Code at C:\Users\BANONAS\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.7.1
[v] Connected device (2 available)
• SM G9250 • 02157df25d9bbb0c • android-arm64 • Android 7.0 (API 24)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
On tap of record, recorder should start recording in the Android side. While recording, some added logs to check if recorder is running should show.
channel.invokeMethod("updateRecorderProgress", json.toString());
should be called every tick.Actual behavior
On tap of record, the recorder starts. Logs do show. It's assumed that
channel.invokeMethod("updateRecorderProgress", json.toString());
is called. In the flutter side however, channel'smethodCallHandler
doesn't trigger.Tested environment (Emulator? Real Device?)
Steps to reproduce the behavior
I've tried the example, and I've tried using flutter_sound in isolation, and flutter sound works well with no hiccups. When integrating with my project though, it doesn't work. My guess is it might clash with other dependencies?
here's a snippet from my pubspec.yaml:
The text was updated successfully, but these errors were encountered: