I am developing a fake call application, I wanted to get the mp3 file of the current ringtone so that I can use it in another application for creating the fake call with the same ringtone file. I have searched a lot but cannot find the right solution. Still, I am using this code to play the current ringtone. Is there any way to get the mp3 file of this ringtone.
public void onClick(View view) {
Uri defaultRintoneUri = RingtoneManager.getActualDefaultRingtoneUri(getApplicationContext(), RingtoneManager.TYPE_RINGTONE);
Ringtone defaultRingtone = RingtoneManager.getRingtone(getApplicationContext(), defaultRintoneUri);
defaultRingtone.play();
}