My app need to save a text file, letting the user customize the file name of that file. Can I know what is the maximum file name length in android, and any special characters are not allowed?
I can only search file name length of Window but not android.
2 years ago, Samsung had a limit of 50 characters. I don’t know if it still like this. Either way Android itself don’t seems to have a limit, it was just Samsung
Try to find the character that takes the most space (W). Make a text document full of those characters. Once the text file size reaches 255 bytes count the characters.
@Mateja I read the thread you posted. It says this: About the maximum length: Since I couldn't find anything specific to Android, and since java does not restrict the length of a file name it works with (As you can see [here](https://stackoverflow.com/questions/4512742/does-java-io-have-a-maximum-file-name-length)), I'd say the maximum length is like the most widely used limit, which is 255 bytes.
So the conclusion is that there is no limit but it is suggested to use 255 normal characters or bytes.