adrielcafe / AndroidAudioConverter

Convert audio files inside your Android app easily. Supported formats: AAC, MP3, M4A, WMA, WAV and FLAC.
1.33k stars 254 forks source link

The problem with the converted file, if there are dots in the path to the original file #34

Open dartl opened 4 years ago

dartl commented 4 years ago

Hello, when I use the file located in the data folder of my application as the original audio file, it doesn’t work out very well (I’m talking about the location and name of the converted file).

I think this is designed for files with the extension and provided that there are no dots in the path to the original file, but in Android this happens very often.

The screenshot shows the whole debugging process and you can understand what is going wrong, I hope that fix it in the future.

P.S. it may be great if you allow me to set the location of the converted file to the user.

image

dartl commented 4 years ago

Through experimentation, I realized that the problem appears when both conditions are satisfied: 1) There are points in the path to the original in places other than the file format 2) There is no file format (For example, audio messages from WatsApp have no format for files with Share). For myself, I found a “crutch”, but it’s probably worth it to somehow handle it in the function itself.