File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
app/src/main/java/com/babanomania/pdfscanner/utils Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,19 @@ public class PermissionUtil {
2020 public static void ask (final Activity activity ){
2121
2222 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+ })
2336 .setDeniedMessage (
2437 "If you reject permission,you can not use this service\n \n " +
2538 "Please turn on permissions at [Setting] > [Permission]" )
You can’t perform that action at this time.
0 commit comments