Delphi Rio introduced permissions management to Android devices. Previously the permission management was done as part of the install process.
The module can be included in earlier versions of Delphi and non Android projects but will simply provide test functionality.
The Permissions Module in my Delphi Library Code provides a single function and the associated type definitions to simplify access to that functionality.
Call the function PermissionsGranted passing in a set of permissions from (Gps, Camera, DataAcc, Network, WiFi, BlueTooth);
These simple permissions are expanded to reflect the Java Class definitions string array and passed to PermissionsService.RequestPermissions.
The return is analyzed and a List of failure strings created. If the return procedure is populated and arrays of Granted and Rejected permissions is returned along with a verbose text list of any rejected by the Java Call.
If the ADlgPasses is set a message dialog will show a text list of Accepted permissions.
If the ADlgFails is set a message dialog will show a text list of Rejected permissions.