private static String removeInvalidCharacters(final String fileName){
  String fixedUpString=Uri.decode(fileName);
  for (int i=0; i < ANSI_INVALID_CHARACTERS.length(); i++) {
    fixedUpString=fixedUpString.replace(ANSI_INVALID_CHARACTERS.charAt(i),'_');
  }
  return Uri.encode(fixedUpString);
}

private static String removeInvalidCharacters ( final String fileName ) { String fixedUpString = Uri . decode ( fileName ) ; for ( int i = 0 ; i < ANSI_INVALID_CHARACTERS . length ( ) ; i ++ ) { fixedUpString = fixedUpString . replace ( ANSI_INVALID_CHARACTERS . charAt ( i ) , '_' ) ; } return Uri . encode ( fixedUpString ) ; }
removes invalid characters on onedrive
