I am creating an own application for android that generates playlists. Application creates .m3u files in UTF-8 encoding format. Files exist and visible in file manager, but media players don't see the playlists and this is a problem. Playlists files are correct and work properly in build-in player in file manager. Here is some part of the code, that gererates playlists:
File file = new File(Environment.getExternalStorageDirectory() + "/Music","Test.m3u");
PrintWriter writer = new PrintWriter(file, "UTF-8");
...
writer.println(PathToSong.toString()+"\r");
....
writer.flush();
writer.close();
I downloaded a program from Play Market that also creates playlists (.m3u) files. Playlists files that are built by the program have the same format as mine, but visible for media players. The most interesting thing is: ater launch the program from Play Market, playlists from my own program becomes visible for media players too.
Also my playlists become visible for the media players after restarting the phone. I develop and test my application using Android Studio 0.3.4.