This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PermissionUtil { | |
/* | |
* Check if version is marshmallow and above. | |
* Used in deciding to ask runtime permission | |
* */ | |
public static boolean shouldAskPermission() { | |
return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M); | |
} | |
private static boolean shouldAskPermission(Context context, String permission){ | |
if (shouldAskPermission()) { |