react-native-call-detection/android/src/main/java/com/pritesh/calldetection/CallDetectionManagerModule.java
@ReactMethod
    public void checkPermission(final String permission, final Promise promise) {
        try {

            if(_checkPermission(permission)) {

                promise.resolve(GRANTED);
                return;
            }

            promise.resolve(DENIED);
        } catch( Exception e) {

            promise.reject("Error checkPermission", e);
        }
    }
/**
    * Check if the app has the permission given. successCallback is called with true if the
    * permission had been granted, false otherwise. See {@link Activity#checkSelfPermission}.
    */
Check if the app has the permission given. successCallback is called with true if the
permission had been granted, false otherwise.
Check if the app has the permission given . successCallback is called with true if the permission had been granted false otherwise .
@ReactMethod
    public void checkPermission(final String permission, final Promise promise) {
        try {
            if(_checkPermission(permission)) {
                promise.resolve(GRANTED);
                return;
            }
            promise.resolve(DENIED);
        } catch( Exception e) {
            promise.reject("Error checkPermission", e);
        }
    }
@ ReactMethod public void checkPermission ( final String permission , final Promise promise ) { try { if ( _checkPermission ( permission ) ) { promise . resolve ( GRANTED ) ; return ; } promise . resolve ( DENIED ) ; } catch ( Exception e ) { promise . reject ( "Error checkPermission" , e ) ; } }
Check if the app has the permission given.
Check if the app has the permission given .