Closed Hitesh2812 closed 1 year ago
does it give you any errors?
Having same issue, seems to be related to the RequestPermissionHandler :
D/RequestPermissionHandler( 1161): parsing result
D/RequestPermissionHandler( 1161): result-1
D/RequestPermissionHandler( 1161): onRequestPermissionsResult -false
D/VRI[MainActivity]( 1161): onFocusEvent true
D/VRI[MainActivity]( 1161): send msg MSG_WINDOW_FOCUS_CHANGED with caller android.view.ViewRootImplExtImpl.markAndDumpWindowFocusChangeMsg:956
android.view.ViewRootImpl.windowFocusChanged:9837
android.view.ViewRootImpl$WindowInputEventReceiver.onFocusEvent:9550 android.os.MessageQueue.nativePollOnce:-2 android.os.MessageQueue.next:349 android.os.Looper.loopOnce:186 android.os.Looper.loop:351 android.app.ActivityThread.main:8399 java.lang.reflect.Method.invoke:-2 com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run:584 com.android.internal.os.ZygoteInit.main:1013 <bottom of call stack> <bottom of call stack> <bottom of call stack> <bottom of call stack> <bottom of call stack> <bottom of call stack> <bottom of call stack> <bottom of call stack> <bottom of call stack>
this issue seems to happens on recent version on android, maybe an update is needed on the permissions management
Might be missing some permission, I guess Google as changed again. Are you requesting the permissions on your app? which ones?
yes, I'm requesting the await AnotherAudioRecorder.hasPermissions
method
using the permission_handler
flutter permissions plugin, I found this info :
/// Permission for accessing external storage.
///
/// Depending on the platform and version, the requirements are slightly
/// different:
///
/// **Android:**
/// - On Android 13 (API 33) and above, this permission is deprecated and
/// always returns `PermissionStatus.denied`. Instead use `Permission.photos`,
/// `Permission.video`, `Permission.audio` or
/// `Permission.manageExternalStorage`. For more information see our
/// [FAQ](https://pub.dev/packages/permission_handler#faq).
/// - Below Android 13 (API 33), the `READ_EXTERNAL_STORAGE` and
/// `WRITE_EXTERNAL_STORAGE` permissions are requested (depending on the
/// definitions in the AndroidManifest.xml) file.
///
/// **iOS:**
/// - Access to folders like `Documents` or `Downloads`. Implicitly granted.
static const storage = Permission._(15);
I ended up using this code :
if (!await Permission.audio.request().isGranted) {...}
Maybe it would be interesting use this plugin as dependency
I use that plugin as well maybe its because I didn't got that problem. I don't really like to add more dependencies to the project
It should all work now on the latest version, thanks. Please let me know otherwise
Getting AnotherAudioRecorder.hasPermissions always false in android 13 (API level 33). So can't able to start recording.