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

Sample rate shouldn't be a mandatory parameter #7

Closed
iNima opened this issue Oct 29, 2019 · 2 comments
Closed

Sample rate shouldn't be a mandatory parameter #7

iNima opened this issue Oct 29, 2019 · 2 comments
Assignees

Comments

@iNima
Copy link

iNima commented Oct 29, 2019

Hi there,

Based on the document the sample rate shouldn't be a mandatory field but in an AndroidX enabled project when I don't set sampleRate I receive this error message:

D/AndroidAudioRecorder(16785): handleHasPermission true
E/MethodChannel#flutter_audio_recorder(16785): Failed to handle method call
E/MethodChannel#flutter_audio_recorder(16785): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference
E/MethodChannel#flutter_audio_recorder(16785): 	at com.zeno.flutter_audio_recorder.FlutterAudioRecorderPlugin.handleInit(FlutterAudioRecorderPlugin.java:146)
E/MethodChannel#flutter_audio_recorder(16785): 	at com.zeno.flutter_audio_recorder.FlutterAudioRecorderPlugin.onMethodCall(FlutterAudioRecorderPlugin.java:105)
E/MethodChannel#flutter_audio_recorder(16785): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/MethodChannel#flutter_audio_recorder(16785): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/MethodChannel#flutter_audio_recorder(16785): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
E/MethodChannel#flutter_audio_recorder(16785): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_audio_recorder(16785): 	at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#flutter_audio_recorder(16785): 	at android.os.Looper.loop(Looper.java:136)
E/MethodChannel#flutter_audio_recorder(16785): 	at android.app.ActivityThread.main(ActivityThread.java:6692)
E/MethodChannel#flutter_audio_recorder(16785): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_audio_recorder(16785): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
E/MethodChannel#flutter_audio_recorder(16785): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
E/flutter (16785): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference, null)
E/flutter (16785): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
E/flutter (16785): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
E/flutter (16785): <asynchronous suspension>
E/flutter (16785): #2      FlutterAudioRecorder._init (package:flutter_audio_recorder/flutter_audio_recorder.dart:69:33)
E/flutter (16785): <asynchronous suspension>
E/flutter (16785): #3      new FlutterAudioRecorder (package:flutter_audio_recorder/flutter_audio_recorder.dart:25:21)

I use the plugin version v0.5.2.

@iNima iNima changed the title Sample rate should not be a mandatory parameter Sample rate shouldn't be a mandatory parameter Oct 29, 2019
@nikli2009 nikli2009 self-assigned this Oct 29, 2019
@nikli2009
Copy link
Contributor

Hi buddy,
just released 0.5.3, in this build, sampleRate is no longer mandatory param in Android and by default it's 16000(good for voice recognition).

Thanks again for all your help.

@iNima
Copy link
Author

iNima commented Oct 30, 2019

No worries @nikli2009
Thanks for your prompt fixes.

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

No branches or pull requests

2 participants