How can I get an array of all files in a specific directory on an SD card, i.e. / ringtone /?
It is very simple. Just follow these steps:
File dir = new File(path); String[] files = dir.list();
You should try the following: http://developer.android.com/guide/topics/data/data-storage.html#filesExternal
Hope I helped.
You look at a specific place, and obviously, if you are looking in the ringtone directory, then you need audio-type files. Here's how to do it.
I have created an example application for you that shows exactly how to complete this task.
Source code: search for files by type + media playback
Source: https://habr.com/ru/post/1315032/More articles:why is there a changed if position in scala? - coding-styleopen link from UIWebView to Safari (iphone) - iphoneC # Why is it not possible to set the selected Value of a dynamically created combobox? - c #How to install in flex 4? - flexHow to compare two versions in Mercurial? - version-controlEdit .RAR file comments from python - pythonHow can I upload a 1.25 GB file size in ASP.NET MVC - c #JavaScript: how to effectively replace all values ββof an object without replacing the object - javascriptTime to create time in ListBox with sample data in WPF - wpfF # type test for sequences, general equality test - equalityAll Articles