Remove any characters from the file name that are not supported by the Android OS, and update the file extension to match the mimeType.