Util

class Util

This class provides Android utility functions.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun checkPermissions(@NonNull context: Context, @NonNull permissions: List<String>): Boolean
Determine whether you have been granted a particular permission.
Link copied to clipboard
open fun requestPermissions(@NonNull context: Context, @NonNull permissions: List<String>, @Nullable callback: PermissionsUtil.RequestPermissionCallback)
Request android permissions in runtime.
Link copied to clipboard
open fun showAlert(@NonNull context: Context, @NonNull title: String, @NonNull message: String)
open fun showAlert(@NonNull context: Context, @NonNull title: String, @NonNull message: String, @Nullable clickListener: DialogInterface.OnClickListener)
This method to create the dialog and display it on screen.
Link copied to clipboard
open fun showToast(@NonNull context: Context, @NonNull message: String, duration: Int)
Show a standard toast that just contains a text view.