opermission/src/main/java/co/omkar/utility/opermission/RequestPermission.java
public static void onResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        if (RequestPermission.requestCode == requestCode) {
            /* Sort granted and denied permissions in array list */
            int count = permissions.length;

            List<String> granted = new ArrayList<>(count);
            List<String> denied = new ArrayList<>(count);

            for (int k = 0; k < count; k++) {
                resultMap.put(Permission.get(permissions[k]), Result.get(grantResults[k]));
                if (grantResults[k] == PackageManager.PERMISSION_GRANTED) {
                    granted.add(permissions[k]);

                } else if (grantResults[k] == PackageManager.PERMISSION_DENIED) {
                    denied.add(permissions[k]);

                }
            }

            String[] grantedArray = granted.toArray(new String[granted.size()]);
            String[] deniedArray = denied.toArray(new String[denied.size()]);

            // forward to invoke annotated methods.
            try {
                invokeAnnotatedMethods(resultMap);
            } catch (IllegalAccessException e) {
                mLog.e(TAG, e.getMessage(), e);
            } catch (InvocationTargetException e) {
                mLog.e(TAG, e.getMessage(), e);
            }

            /* Send local broadcast on permissions result. */
            Intent intent = new Intent(PERMISSION_RESULT_BROADCAST);
            intent.putExtra(GRANTED, grantedArray);
            intent.putExtra(DENIED, deniedArray);
            LocalBroadcastManager.getInstance(mActivity).sendBroadcast(intent);
        }
    }
public static void onResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        if (RequestPermission.requestCode == requestCode) {
            /* Sort granted and denied permissions in array list */
            int count = permissions.length;

            List<String> granted = new ArrayList<>(count);
            List<String> denied = new ArrayList<>(count);

            for (int k = 0; k < count; k++) {
                resultMap.put(Permission.get(permissions[k]), Result.get(grantResults[k]));
                if (grantResults[k] == PackageManager.PERMISSION_GRANTED) {
                    granted.add(permissions[k]);

                } else if (grantResults[k] == PackageManager.PERMISSION_DENIED) {
                    denied.add(permissions[k]);

                }
            }

            String[] grantedArray = granted.toArray(new String[granted.size()]);
            String[] deniedArray = denied.toArray(new String[denied.size()]);

            // forward to invoke annotated methods.
            try {
                invokeAnnotatedMethods(resultMap);
            } catch (IllegalAccessException e) {
                mLog.e(TAG, e.getMessage(), e);
            } catch (InvocationTargetException e) {
                mLog.e(TAG, e.getMessage(), e);
            }

            /* Send local broadcast on permissions result. */
            Intent intent = new Intent(PERMISSION_RESULT_BROADCAST);
            intent.putExtra(GRANTED, grantedArray);
            intent.putExtra(DENIED, deniedArray);
            LocalBroadcastManager.getInstance(mActivity).sendBroadcast(intent);
        }
    }
public static void onResult ( int requestCode , @ NonNull String [ ] permissions , @ NonNull int [ ] grantResults ) { if ( RequestPermission . requestCode == requestCode ) { /* Sort granted and denied permissions in array list */ int count = permissions . length ; List < String > granted = new ArrayList <> ( count ) ; List < String > denied = new ArrayList <> ( count ) ; for ( int k = 0 ; k < count ; k ++ ) { resultMap . put ( Permission . get ( permissions [ k ] ) , Result . get ( grantResults [ k ] ) ) ; if ( grantResults [ k ] == PackageManager . PERMISSION_GRANTED ) { granted . add ( permissions [ k ] ) ; } else if ( grantResults [ k ] == PackageManager . PERMISSION_DENIED ) { denied . add ( permissions [ k ] ) ; } } String [ ] grantedArray = granted . toArray ( new String [ granted . size ( ) ] ) ; String [ ] deniedArray = denied . toArray ( new String [ denied . size ( ) ] ) ; // forward to invoke annotated methods. try { invokeAnnotatedMethods ( resultMap ) ; } catch ( IllegalAccessException e ) { mLog . e ( TAG , e . getMessage ( ) , e ) ; } catch ( InvocationTargetException e ) { mLog . e ( TAG , e . getMessage ( ) , e ) ; } /* Send local broadcast on permissions result. */ Intent intent = new Intent ( PERMISSION_RESULT_BROADCAST ) ; intent . putExtra ( GRANTED , grantedArray ) ; intent . putExtra ( DENIED , deniedArray ) ; LocalBroadcastManager . getInstance ( mActivity ) . sendBroadcast ( intent ) ; } }
Get on Request Permissions Results, invoke annotated methods and send a local broadcast of results.

@param requestCode  Auto Generated request code.
@param permissions  Permissions asked.
@param grantResults Result of permissions asked.
Get on Request Permissions Results invoke annotated methods and send a local broadcast of results .