Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
No permission request query (Android) at app start - Gideros Forum

No permission request query (Android) at app start

saeyssaeys Member
edited January 25 in General questions
Hi guys, I have a question that might not be a Gideros question, but I ask it anyway

My app uses the Microphone plugin and so uses the RECORD_AUDIO uses-permission tag in the Manifest. That's a "Dangerous" permission that needs to be granted at first app startup.

So there should be a permission pop-up at app-startup (it has been before) requesting permission to use the Microphone feature. But there is no request -> app can't use the Microphone methods and crashes at init.

To get the app to work I need to manually go to the app permissions settings on the device and turn on the mic permission there.

This goes for my test device with API 25. (Another with API 22 automatically sets the permission, as it should be.)

Is there something I have missed here? Can I somehow force the permission request to popup?

Comments

  • hgy29hgy29 Maintainer
    Accepted Answer
    Which API did you target when you exported your project ? If you set it higher than 19 (or maybe 22, I am not sure), then android assumes that the app can deal with the newer permission requesting scheme, which is wrong for most gideros plugins

    Likes: saeys

    +1 -1 (+1 / -0 ) Share on Facebook
  • saeyssaeys Member
    edited January 25
    That was it. Was targeting 25. When targeting 22 it worked. (Just noted that the already published app targeted 22, so I must have been wrong in remembering permission request popups... B) )

    (22 worked with buildToolsVersion 26.0.2, no warnings. For the future I hope 22 will continue to work as tools get updated. I guess it eventually comes down to updating the plugins to work with the permissions 23 and beyond.)

    EDIT: Anyway, I think the info on compatible APIs should be in the plugin docs.

    Likes: Apollo14

    +1 -1 (+1 / -0 ) Share on Facebook
  • Yes, I think it's 22 (not 19) that still asks for the permissions, that seems to be what I have experienced. Anything above 22 will need it to be done within the app.

    Likes: saeys

    +1 -1 (+1 / -0 ) Share on Facebook
  • saeyssaeys Member
    hgy29 said:

    If you set it higher than 19 (or maybe 22, I am not sure), then android assumes that the app can deal with the newer permission requesting scheme, which is wrong for most gideros plugins

    So I'm staying at Android API 22 as long as I want a working microphone plugin.

    Now, as I just submit an update on Google Play Console I got a warning; from november 2018 all app updates must be at API 26 or later. (august 2018 for new apps)

    Since the microphone plugin (and other plugins?) in its current state only works with API 22 or less I really hope there is a competent saint out there who can update the plugin(s) to work with a newer API with the newer permission schemes.

    Likes: hgy29, Apollo14

    +1 -1 (+2 / -0 ) Share on Facebook
  • hgy29hgy29 Maintainer
    It would help if we could somehow figure out a list of plugins that would be impacted
  • simwhisimwhi Member
    I've been updating apps today and came across this issue.
  • hgy29hgy29 Maintainer
    edited May 25
    I am updating microphone and camera plugin to request permission the new way. There is a problem though, permission request in asynchronous, meaning that the first call to microphone/camera will fail while the permission request is shown, so it would have to be retried after the user has accepted or refused the permission. And there is no event at gideros side to report is the user closed the permission request window.

    Likes: saeys

    +1 -1 (+1 / -0 ) Share on Facebook
Sign In or Register to comment.