Skip to content

Instantly share code, notes, and snippets.

@DelphiWorlds
Created March 25, 2020 21:18
Show Gist options
  • Save DelphiWorlds/1d2303fdc52ca4f9416c4a471209725e to your computer and use it in GitHub Desktop.
Save DelphiWorlds/1d2303fdc52ca4f9416c4a471209725e to your computer and use it in GitHub Desktop.
uses
System.Permissions;
procedure TForm1.RequestCallPhonePermission;
begin
PermissionsService.RequestPermissions(['android.permission.CALL_PHONE'],
procedure(const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>)
begin
if AGrantResults[0] = TPermissionStatus.Granted then
// Permission has been granted
end
);
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment