Click image for larger version. 

Name:	NewPermission01.PNG 
Views:	107 
Size:	26.1 KB 
ID:	30355
Click image for larger version. 

Name:	NewPermission02.PNG 
Views:	97 
Size:	25.6 KB 
ID:	30356

Code:
At the import level add
         import Runtime.PermissionsResultAction;
available methods
                         
         public void askForPermission(String[] permissions, @Nullable PermissionsResultAction action)
         //check example below
 
         public boolean hasAllPermissionsGranted(String[] permissions)
 
         public boolean hasPermissionGranted(String permission)
 
         public boolean hasPermissionDenied(String permission)
 
         public boolean hasPermissionBlocked(String permission)
 
         public boolean hasManifestPermission(String permission)
To check for user answer
       String[] permissions = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE,
                Manifest.permission.WRITE_EXTERNAL_STORAGE};
        if(!MMFRuntime.inst.hasAllPermissionsGranted(permissions)) {
            if(!MMFRuntime.inst.hasPermissionBlocked(permissions[0])
                    && !MMFRuntime.inst.hasPermissionBlocked(permissions[1])) {
                MMFRuntime.inst.askForPermission(
                        permissions,
                        new PermissionsResultAction() {
                            @Override
                            public void onGranted() {
                                // Do whatever you need user allowed permission(s);
                            }
 
                            @Override
                            public void onDenied(String permission) {
                               // User denied ...;
                            }
                        }
                );
            }
        }