File tree 1 file changed +13
-0
lines changed
app/src/main/java/com/babanomania/pdfscanner/utils
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,19 @@ public class PermissionUtil {
20
20
public static void ask (final Activity activity ){
21
21
22
22
TedPermission .with ( activity .getApplicationContext () )
23
+ .setPermissionListener (new PermissionListener () {
24
+ @ Override
25
+ public void onPermissionGranted () {
26
+ //Toast.makeText(activity, "Permission Granted", Toast.LENGTH_SHORT).show();
27
+ }
28
+
29
+ @ Override
30
+ public void onPermissionDenied (List <String > deniedPermissions ) {
31
+ Toast .makeText (activity , "Permission Denied\n " + deniedPermissions .toString (), Toast .LENGTH_SHORT ).show ();
32
+ }
33
+
34
+
35
+ })
23
36
.setDeniedMessage (
24
37
"If you reject permission,you can not use this service\n \n " +
25
38
"Please turn on permissions at [Setting] > [Permission]" )
You can’t perform that action at this time.
0 commit comments