public void launch(){
  if (TextUtils.isEmpty(appName)) {
    throw new RuntimeException("You need to define an app name!");
  }
  if (permissions.isEmpty()) {
    throw new RuntimeException("You need to supply at least one permission!");
  }
  List<Permission> permissionList=permissionsDenied(permissions);
  if (permissionList == null || permissionList.isEmpty()) {
    return;
  }
  permissionsActivity=this;
  Intent permissionActivity=new Intent(launchContext,PermissionsFlowActivity.class);
  permissionActivity.putExtra(APP_NAME,appName);
  permissionActivity.putExtra(PERMISSIONS,permissionList.toArray(new Permission[permissionList.size()]));
  permissionActivity.putExtra(BG_COLOR,bgColor);
  permissionActivity.putExtra(BAR_COLOR,barColor);
  permissionActivity.putExtra(MAIN_TEXT_COLOR,mainTextColor);
  permissionActivity.putExtra(MAIN_TEXT_COLOR_SECONDARY,mainTextColorSecondary);
  permissionActivity.putExtra(BAR_TEXT_COLOR,barTextColor);
  permissionActivity.putExtra(STATUS_BAR_COLOR,statusBarColor);
  permissionActivity.putExtra(NAVIGATION_BAR_COLOR,navBarColor);
  permissionActivity.putExtra(LIGHT_STATUS_BAR,lightStatusBar);
  permissionActivity.putExtra(ICON_COLOR,iconColor);
  permissionActivity.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  launchContext.startActivity(permissionActivity);
}

public void launch ( ) { if ( TextUtils . isEmpty ( appName ) ) { throw new RuntimeException ( "You need to define an app name!" ) ; } if ( permissions . isEmpty ( ) ) { throw new RuntimeException ( "You need to supply at least one permission!" ) ; } List < Permission > permissionList = permissionsDenied ( permissions ) ; if ( permissionList == null || permissionList . isEmpty ( ) ) { return ; } permissionsActivity = this ; Intent permissionActivity = new Intent ( launchContext , PermissionsFlowActivity . class ) ; permissionActivity . putExtra ( APP_NAME , appName ) ; permissionActivity . putExtra ( PERMISSIONS , permissionList . toArray ( new Permission [ permissionList . size ( ) ] ) ) ; permissionActivity . putExtra ( BG_COLOR , bgColor ) ; permissionActivity . putExtra ( BAR_COLOR , barColor ) ; permissionActivity . putExtra ( MAIN_TEXT_COLOR , mainTextColor ) ; permissionActivity . putExtra ( MAIN_TEXT_COLOR_SECONDARY , mainTextColorSecondary ) ; permissionActivity . putExtra ( BAR_TEXT_COLOR , barTextColor ) ; permissionActivity . putExtra ( STATUS_BAR_COLOR , statusBarColor ) ; permissionActivity . putExtra ( NAVIGATION_BAR_COLOR , navBarColor ) ; permissionActivity . putExtra ( LIGHT_STATUS_BAR , lightStatusBar ) ; permissionActivity . putExtra ( ICON_COLOR , iconColor ) ; permissionActivity . addFlags ( Intent . FLAG_ACTIVITY_NEW_TASK ) ; launchContext . startActivity ( permissionActivity ) ; }
launches the permissions flow activity .
