How to access the entire list of ringtones on an Android phone?

I want to access the list of ringtones. How can i do this?

Later I want to add / remove ringtones to the library? Is it possible?

+3
source share
2 answers

You can use RingtoneManagerto access all existing tunes.

Take a look at this question for an example on how to add ringtones.

+7
source

Try to access the ringtone file

File racine = getDatabasePath("/system/media/audio/ringtones");

   final File[] liste = racine.listFiles();
    if (liste == null) return;
   final  int lng = liste.length;
    if (lng == 0) return;
0
source

Source: https://habr.com/ru/post/1729664/


All Articles