1

How can I find whether ringtone is already playing? If it is already playing then do not play it again.

Om3ga
  • 30,465
  • 43
  • 141
  • 221

1 Answers1

1

You can use:

Uri ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
Ringtone ringtone = RingtoneManager.getRingtone(this, ringtoneUri);

And check whether ringtone is null or not and make decision accordingly.

Imran Rana
  • 11,899
  • 7
  • 45
  • 51