[Interest] Android: Better way of asserting permanent permission refusal

René Hansen renehh at gmail.com
Tue Jun 26 13:27:09 CEST 2018


Hi,


When requesting specific permissions through
QtAndroid::requestPermissions{,Sync}, the host native permissions popup has
the option to "Don't show this again", on subsequent requests, which will
permanently disable the popups on future invocations.

>From then on a permission can only be given through host sytem global
settings.

The question then becomes, is there a canonical way to figure out, if the
user has ticked the "Don't show again" for a specific permission?

Right now I've resorted to heuristic, where I time the response of the
permissions request. Typically it comes back in < 150 msec, when it has
been perma-denied, and the fastest I've been able to allow or deny it via
the popup was about 900 msec. I've placed my guesstimate predicate at 400
msec, to allow a bit of margin for error on slower devices.

But... this seems like such a bad hack.

Can anyone tell me of a better way to do this?


Best regards,

René Hansen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180626/c6f4d0ed/attachment.html>


More information about the Interest mailing list