Jump to content

Piotr Daszewski

Members
  • Content Count

    2
  • Joined

  • Last visited

Posts posted by Piotr Daszewski


  1. Hello everyone.

    How can I check in the Delphi (FMX) application for Android whether the push notifications permission has been received by the user in the system application settings?

    NotificationCenter still sees the permission as granted.

    A simple example:

    procedure TMainForm.NotificationCenterPermissionRequestResult(Sender: TObject; const AIsGranted: Boolean);

    begin

    if AIsGranted then ShowMessage('IsGranted = True') else ShowMessage('IsGranted = False')

    end;

    procedure TMainForm.btnAuthorizationStatusClick(Sender: TObject);

    begin

    case NotificationCenter.AuthorizationStatus of

    TAuthorizationStatus.NotDetermined: ShowMessage('AuthorizationStatus = NotDetermined');

    TAuthorizationStatus.Restricted: ShowMessage('AuthorizationStatus = Restricted');

    TAuthorizationStatus.Denied: ShowMessage('AuthorizationStatus = Denied');

    TAuthorizationStatus.Authorized: ShowMessage('AuthorizationStatus = Authorized');

    end;

    end;

    For procedures "NotificationCenterPermissionRequestResul" I always get "'IsGranted = True".

    For the procedure "btnAuthorizationStatusClick" I always get "AuthorizationStatus = Authorized".

    No way to identify that the user has turned off notifications.

    Any suggestions? Hints?

    I will be very grateful.

×