question: @ Override public void onRequestPermissionsResult ( int requestCode , @ NonNull String [ ] permissions , @ NonNull int [ ] grantResults ) { if ( requestCode == ALLOW_PERMISSIONS && grantResults . length > 0 ) { List < String > permissionsNotAllowed = new ArrayList < > ( ) ; for ( int i = 0 ; i < permissions . length ; i ++ ) { if ( grantResults [ i ] == PackageManager . PERMISSION_DENIED ) { permissionsNotAllowed . add ( permissions [ i ] ) ; } } if ( permissionsNotAllowed . isEmpty ( ) ) { initEvent ( ) ; } else { permissionNotEnabled ( ) ; } } else { permissionNotEnabled ( ) ; } }
target:  This method is a callback. Check the user's answer after requesting permission.