How Grant works: PermissionsManager and PermissionsResultAction
masterGrant simplifies Android permission handling by removing the need to manage complex logic inside onRequestPermissionsResult. It uses two primary components:
PermissionsManager: A singleton class that manages all permission requests, logic, and callbacks.PermissionsResultAction: A callback interface used to define what code should execute when permissions are either granted or denied.
Instead of manually checking permissions and handling request codes, you wrap your sensitive logic in a PermissionsResultAction and pass it to the PermissionsManager. The manager handles the checking, requesting, and callback orchestration.