Android complaining even after granting all permissions

Welcome! Forums Unity Plugins Mobile Speech Recognizer Android complaining even after granting all permissions

Tagged: 

  • This topic has 13 replies, 2 voices, and was last updated 3 years ago by prad.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #11732
    prad
    Participant

    I get the following error still when trying to build to Android. Any pointers?

    [9] 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 .

    Thanks

    #11734
    PiotrPiotr
    Keymaster

    Check this out please 🙂

    Android runtime permissions

    #11737
    prad
    Participant

    Did exactly that after searching the forums (and before reaching out). Adding screen shot of code and AndroidManifest with locations

    Issue voice recorder

    #11739
    prad
    Participant

    @Piotr, any thoughts or recommendations on how to fix this?

    #11741
    PiotrPiotr
    Keymaster

    Hm this is weird – everything seems to be implemented correctly.
    Could you check if AndroidManifest.xml in 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 HasAuthorizedPermission line? Is Unity app ever requesting permission for recording audio?

    #11742
    prad
    Participant

    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.

    #11744
    PiotrPiotr
    Keymaster

    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/StagingArea directory?

    #11745
    prad
    Participant

    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” />

    #11746
    PiotrPiotr
    Keymaster

    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?

    #11747
    prad
    Participant

    I am using Unity 2019.4 and the Android version 10.

    #11748
    PiotrPiotr
    Keymaster

    And those steps 1, 2 and 3 are happening, correct?

    #11749
    prad
    Participant

    Yes. Do you have a fully working project on any recent Unity/Android targets? I can try that out.. Thanks in advance.

    #11751
    PiotrPiotr
    Keymaster

    Can you check it with 1.3.5 beta version available here?

    #11753
    prad
    Participant

    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?

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.