3

I want to access the ringtones list. How can I do that?

At later I want to add/ remove ring tones to library? Is it possible?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Jim
  • 4,639
  • 5
  • 27
  • 31

2 Answers2

7

You can use the RingtoneManager to access all the existing ringtones.

Have a look at this question for an example of how to add ringtones.

Community
  • 1
  • 1
David Webb
  • 190,537
  • 57
  • 313
  • 299
  • That's great.RingtoneManager allows access to each ringtone files. There is no API avaiable to add/remove ringtones. is it possible to add/remove ringtones? – Jim Jan 23 '10 at 06:49
  • @Jim - just edited the question to link to a question which shows you how to add ringtones. – David Webb Jan 23 '10 at 06:50
0

Try this 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;
legoscia
  • 39,593
  • 22
  • 116
  • 167