Class OkHiPermissionService

java.lang.Object
io.okhi.android_core.models.OkHiPermissionService

public class OkHiPermissionService extends Object
  • Field Details

  • Constructor Details

    • OkHiPermissionService

      public OkHiPermissionService(androidx.appcompat.app.AppCompatActivity activity)
    • OkHiPermissionService

      public OkHiPermissionService(android.app.Activity activity)
  • Method Details

    • onRequestPermissionsResult

      public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults, OkHiPermissionHandler permissionHandler)
    • isBackgroundLocationPermissionGranted

      public static boolean isBackgroundLocationPermissionGranted(android.content.Context context)
    • isLocationPermissionGranted

      public static boolean isLocationPermissionGranted(android.content.Context context)
    • isPackageInstalled

      public static boolean isPackageInstalled(String packageName, android.content.Context context)
    • requestLocationPermission

      public void requestLocationPermission(String rationaleTitle, String rationaleMessage, OkHiRequestHandler<Boolean> handler)
    • requestBackgroundLocationPermission

      public void requestBackgroundLocationPermission(String rationaleTitle, String rationaleMessage, OkHiRequestHandler<Boolean> handler)
    • requestBackgroundLocationPermission

      public void requestBackgroundLocationPermission(OkHiRequestHandler<Boolean> handler)
    • requestLocationPermission

      public void requestLocationPermission(OkHiRequestHandler<Boolean> handler)
    • openProtectedAppsSettings

      public static void openProtectedAppsSettings(android.app.Activity activity, int requestCode) throws OkHiException
      Throws:
      OkHiException
    • canOpenProtectedApps

      public static Boolean canOpenProtectedApps(android.content.Context context)
    • isNotificationPermissionGranted

      public static boolean isNotificationPermissionGranted(android.content.Context context)
    • requestNotificationPermission

      public void requestNotificationPermission(OkHiRequestHandler<Boolean> handler)