When StartRecording() is first called, an alert window displays asking the user to confirm recording. How can I know when the user answered “no” to this alert window?
Bump. Good question!
Great question? Did you ever end up figuring this out?
No
Until there is a method for this, this is my workaround: just wait a couple of seconds and test if I’m receiving audio data. If there is no data, I assume the user answered “no”.
Bump. It’s still actual. The timer is not an elegant solution. Is there really no built-in way?
@Alexey @_Paulius @Mantas-Puida
There is one. But unity internally uses default Replay kit api provided by iOS frameworks. However, this has couple of limitations like not delivering proper status, no file path for recorded video. Also, default replay kit api has many microphone related issues on iOS 11 & 12.
We have a plugin on asset store which solves the issues and also the plugin with the same api works on Android too!
Please do have a look at Cross Platform Replay Kit.
Cheers,
VB Team
Thank you.
Version 1.4 submitted to Asset Store and is under review.
- Now on Android, the permission request is cached and will be displayed only once.
- Updated error strings with error codes to have your own customised text for error responses
- Support for Android Q (Due to manifest backward incompatibility, you need to enable it manually in settings if you are targeting Android 10/Q).
Hi Voxel-Busters, I am using your assets and I am asked for permissions every time I try to record. Is there a way to check if the app already has permission to record?
Permission is displayed by native os and there is currently no way to avoid it. We use native frameworks for screen recording. On iOS its displayed for after every last 8 mins inactivity.