I am using Xamarin and Xamarin.Essentials, although this question probably applies to all Android development.
I have an application which asks the user for permission to read activity (steps) from the hardware. The user can either grant or deny permissions. If the user denies, then the application does not perform the usual step reporting logic.
A user may choose to grant steps permission, but I would like to allow the user to change their mind later. Is it possible for an app to request that its own permission which have been previously granted be revoked? This would simplify the coding as I could rely on the existing logic in my app rather than adding an extra layer for whether it has been revoked.
I looked through the Xamarin Essentials API and didn't see anything obvious about revoking permissions. Is this possible? Or is it recommended that an app direct the user to the Android settings to revoke permissions? If it is possible, can anyone point me to documentation (Xamarin would be great if possible) to accomplish this?
There are several cases that might apply to your situation:
Do see the Android developer docs: