Package io.okhi.android_core
Class OkHi
java.lang.Object
io.okhi.android_core.OkHi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isBackgroundLocationPermissionGranted
(android.content.Context context) static boolean
isGooglePlayServicesAvailable
(android.content.Context context) static boolean
isLocationPermissionGranted
(android.content.Context context) static boolean
isLocationServicesEnabled
(android.content.Context context) static boolean
isNotificationPermissionGranted
(android.content.Context context) void
onActivityResult
(int requestCode, int resultCode, android.content.Intent data) void
onRequestPermissionsResult
(int requestCode, String[] permissions, int[] grantResults) void
onRequestPermissionsResult
(int requestCode, String[] permissions, int[] grantResults, OkHiPermissionHandler handler) static void
openAppSettings
(android.content.Context context) static void
openLocationServicesSettings
(android.app.Activity activity) void
void
requestBackgroundLocationPermission
(String rationaleTitle, String rationaleMessage, OkHiRequestHandler<Boolean> handler) void
void
void
void
void
requestLocationPermission
(String rationaleTitle, String rationaleMessage, OkHiRequestHandler<Boolean> handler) void
-
Constructor Details
-
OkHi
public OkHi(@NonNull androidx.appcompat.app.AppCompatActivity activity) -
OkHi
public OkHi(@NonNull android.app.Activity activity)
-
-
Method Details
-
isLocationPermissionGranted
public static boolean isLocationPermissionGranted(@NonNull android.content.Context context) -
isBackgroundLocationPermissionGranted
public static boolean isBackgroundLocationPermissionGranted(@NonNull android.content.Context context) -
isLocationServicesEnabled
public static boolean isLocationServicesEnabled(@NonNull android.content.Context context) -
isGooglePlayServicesAvailable
public static boolean isGooglePlayServicesAvailable(@NonNull android.content.Context context) -
openLocationServicesSettings
public static void openLocationServicesSettings(@NonNull android.app.Activity activity) -
requestLocationPermission
public void requestLocationPermission(@NonNull String rationaleTitle, @NonNull String rationaleMessage, OkHiRequestHandler<Boolean> handler) -
requestLocationPermission
-
requestBackgroundLocationPermission
-
requestBackgroundLocationPermission
public void requestBackgroundLocationPermission(@NonNull String rationaleTitle, @NonNull String rationaleMessage, OkHiRequestHandler<Boolean> handler) -
requestEnableGooglePlayServices
-
requestEnableLocationServices
-
requestNotificationPermission
-
requestEnableVerificationServices
-
isNotificationPermissionGranted
public static boolean isNotificationPermissionGranted(@NonNull android.content.Context context) -
openAppSettings
public static void openAppSettings(@NonNull android.content.Context context) -
onRequestPermissionsResult
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) -
onRequestPermissionsResult
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults, @NonNull OkHiPermissionHandler handler) -
onActivityResult
public void onActivityResult(int requestCode, int resultCode, android.content.Intent data)
-