Status Update
Comments
vi...@google.com <vi...@google.com>
ga...@google.com <ga...@google.com> #2
Hello,
I'm only a little familiar with Power Apps. Is your app a mobile app or a web app?
This link
The primary
If your app does not work on Android mobile devices, you can also consider the
ri...@gmail.com <ri...@gmail.com> #3
ga...@google.com <ga...@google.com> #4
Thanks for confirming this, really helpful.
You raise good questions here, and I think at the moment it may be a challenge at the least to identify that third time. Equally, we need to explore guidance should it be necessary for the user to be directed to the HC app.
We're actively exploring this topic, and I hope you'll understand if it takes us a little while to iterate on this behaviour. Will update this bug at that time.
ri...@gmail.com <ri...@gmail.com> #5
Many thanks for the activity on this, glad to help! We're looking forward for updates.
ga...@google.com <ga...@google.com>
er...@gmail.com <er...@gmail.com> #6
de...@gmail.com <de...@gmail.com> #7
Usually with permissions we can find out if the user denied us the permission too many times and thus can show some kind of dialog and/or jump into the settings of the app in question. I would do the same here (and jump to the health connect app) but I can't find out in advance whether a call to requestPermissions.launch(PERMISSIONS)
will result in the permission dialog being opened or not (and my callback being triggered right away).
The tipp from
For now, if you want to determine whether you're app has requested a particular permission before, you'll need to keep track of that within your app.
is not viable because one would need to keep track of that between installations of the app, because if an app is deinstalled and then reinstalled the call to requestPermissions.launch(PERMISSIONS)
still does not open up the HC app once the permission sheet was cancelled twice or more.
es...@gmail.com <es...@gmail.com> #8
I know it was marked as Obsolete, but I see that my question is relative to the discussion from this thread and I don't want to spam with duplicates.
You previously mentioned the general logic of internal permissions handling:
As background to help as to why, here's how requesting permissions currently works: When the Permissions UI is launched from your app, if you click cancel, then a counter is incremented for each of the permissions that you requested. If that counter reaches a limit (currently 2), then subsequent requests to launch the Permissions UI for that permission will not work, and you'll just get the empty permissions result.
Do you know whether this approach was changed during Android 14 upgrade?
For Android 13 and lower - clicking Cancel
button twice results in avoiding all the subsequent runs (until the permissions are being reset manually). But it does not increment the counter when I give just a few permissions (like, 3 out of 10). I can call this request as much as I want granting at least 1 permission and clicking Allow
, not Cancel
.
For Android 14 - I see the same behavior for Cancel
treatment. But now it seems that clicking Allow
with just a portion of permissions also increments the counter. I can only perform 2 requests with 1 permission in each, with all the following requests being skipped.
Tested on Pixel 6.
da...@gmail.com <da...@gmail.com> #9
there are legit use cases where an app may want to request permissions more than once. An app may want to request permissions progressively, as features within the app are discovered or activated by the user. This is actually a best practice: don't ask permissions upfront for everything, but do it gradually, as required.
I find the counter quite problematic in this regard. I understand that one doesn't want to allow apps to request permissions forever, but why should the counter be permanent? Why not reset it after, for example, 24h?
Description
NOT security related.
Using:
and the following code, taken from the Android developer guide (https://developer.android.com/guide/health-and-fitness/health-connect/get-started ):
What should happen:
When I call
checkPermissionsAndRun(client)
, a permission activity from Health Connect app should be displayed and result returned after user interaction with that activity.What happens:
When I call
checkPermissionsAndRun(client)
, a permission activity from Health Connect is displayed only the first time after Health Connect app installation. Subsequent calls do not call up the permission request activity and only directly return the result.There are three cases when this is a problem:
There is no way now for the developer to ask for the permissions if not granted for the first time, which I believe is a bug.