public boolean rename(String name){
  if (name == null || name.length() <= 0)   throw new NullPointerException("The passed name is invalid, have you checked its validity?");
 else   if (!isConnected()) {
    onError(OneSheeldError.DEVICE_NOT_CONNECTED);
    return false;
  }
 else   if (isUpdatingFirmware()) {
    onError(OneSheeldError.FIRMWARE_UPDATE_IN_PROGRESS);
    return false;
  }
 else   if (hasRenamingStarted) {
    Log.i("Device " + this.name + ": Device is in the middle of another renaming request.");
    return false;
  }
  renamingRetries=MAX_RENAMING_RETRIES_NUMBER;
  hasRenamingStarted=true;
  return sendRenamingRequest(name);
}

public boolean rename ( String name ) { if ( name == null || name . length ( ) <= 0 ) throw new NullPointerException ( "The passed name is invalid, have you checked its validity?" ) ; else if ( ! isConnected ( ) ) { onError ( OneSheeldError . DEVICE_NOT_CONNECTED ) ; return false ; } else if ( isUpdatingFirmware ( ) ) { onError ( OneSheeldError . FIRMWARE_UPDATE_IN_PROGRESS ) ; return false ; } else if ( hasRenamingStarted ) { Log . i ( "Device " + this . name + ": Device is in the middle of another renaming request." ) ; return false ; } renamingRetries = MAX_RENAMING_RETRIES_NUMBER ; hasRenamingStarted = true ; return sendRenamingRequest ( name ) ; }
rename the board . note : if the new name does not have " 1sheeld " in its name , it will not be visible in any future scans by the sdk .
