Package 

Class PermissionsManager

    • Constructor Detail

      • PermissionsManager

        PermissionsManager()
    • Method Detail

      • registerLocationPermissionsListener

         final Unit registerLocationPermissionsListener(Fragment fragment, Function1<Map<String, Boolean>, Unit> onAllowed, Function1<Map<String, Boolean>, Unit> onDenied)

        Registers a listener for location permissions requests.

        This must only be called once.

        Recommended calling this method in your fragment's onCreateView method.

        Parameters:
        fragment - Fragment instance.
        onAllowed - Callback when grants all permissions.
        onDenied - Callback when denies all or at least one permission.
      • registerBluetoothPermissionsListener

         final Unit registerBluetoothPermissionsListener(Fragment fragment, Function1<Map<String, Boolean>, Unit> onAllowed, Function1<Map<String, Boolean>, Unit> onDenied)

        Registers a listener for bluetooth permissions requests.

        This must only be called once.

        Recommended calling this method in your fragment's onCreateView method.

        Parameters:
        fragment - Fragment instance.
        onAllowed - Callback when grants all permissions.
        onDenied - Callback when denies all or at least one permission.
      • onDestroy

         final Unit onDestroy()

        Unregisters all listeners and destroys all related instances.

        Invoke this in your activity / fragment onDestroy method.