Welcome! › Forums › Unity Plugins › Mobile Speech Recognizer › Android complaining even after granting all permissions
- This topic has 13 replies, 2 voices, and was last updated 2 years, 1 month ago by prad.
March 31, 2021 at 1:58 pm #11732
I get the following error still when trying to build to Android. Any pointers?
 insufficient permissions. Check your manifest file!
I added the permissions specified in the manual to the AndroidManifest file
also the c# code to request for permission for new Android builds.
I also tried to manually grant all permissions to this app. Still does not work. Is there an updated example or project .
ThanksMarch 31, 2021 at 6:56 pm #11734
Check this out please 🙂March 31, 2021 at 7:45 pm #11737
Did exactly that after searching the forums (and before reaching out). Adding screen shot of code and AndroidManifest with locationsApril 2, 2021 at 4:33 pm #11739
@Piotr, any thoughts or recommendations on how to fix this?April 3, 2021 at 7:20 pm #11741
Hm this is weird – everything seems to be implemented correctly.
Could you check if
AndroidManifest.xmlin apk generated by Unity actually has those values? Maybe some other plugin (or something else) is overwriting here.
Also does your code ever step under this
HasAuthorizedPermissionline? Is Unity app ever requesting permission for recording audio?April 5, 2021 at 5:18 am #11742
I am using an empty project with just this package. I see the ‘record audio’ and ‘internet’ permissions when I click all permissions in Android but the app never asked at runtime.
Do you happen to have an empty blank project with the permissions? Thanks.April 5, 2021 at 12:53 pm #11744
Wait, but why permission API does not request permission? Did you allow the app to use record audio or not?
Also could you make sure if it’s generated AndroidManifest by looking at
Temp/StagingAreadirectory?April 5, 2021 at 6:00 pm #11745
It requests only for the Microphone, but shows permissions for record audio and internet.
UnityManifest.xml is generated under Temp/StagingArea and that contains the following lines
<uses-permission android:name=”android.permission.RECORD_AUDIO” />
<uses-permission android:name=”android.permission.INTERNET” />April 5, 2021 at 8:20 pm #11746
So you 1. Request microphone permission via Unity API 2. Permission request works, so you face permission dialog and click on „allow” 3. While trying to run speech recognition you see missing permission error? Absolutely no idea how its possible, is there anything additional I would need to know? What Unity / Android version are you using?April 5, 2021 at 9:00 pm #11747
I am using Unity 2019.4 and the Android version 10.April 5, 2021 at 10:41 pm #11748
And those steps 1, 2 and 3 are happening, correct?April 5, 2021 at 10:44 pm #11749
Yes. Do you have a fully working project on any recent Unity/Android targets? I can try that out.. Thanks in advance.April 8, 2021 at 5:26 pm #11751April 8, 2021 at 9:46 pm #11753
The permission issue is resolved with this one! Thank You!
However, the button stops recording and shows ‘Start recording’ almost immediately every time I clock the button. The partial results show “Say Something”. Not sure if endofSpeech is triggered pre-emptively. Any way to disable that?
- You must be logged in to reply to this topic.