question: public void askPermissions ( ) { mPermissionsToAsk = getNotGrantedPermissions ( ) ; if ( mPermissionsToAsk . size ( ) > 0 && Build . VERSION . SDK_INT >= Build . VERSION_CODES . M ) { requestPermissions ( mPermissionsToAsk . toArray ( new String [ mPermissionsToAsk . size ( ) ] ) , MY_PERMISSION_REQUEST_ALL ) ; } else { sendResponse ( true ) ; } }
target:  Main function to ask permissions