0

Here is the code

        File dir = new File(Environment.getExternalStorageDirectory(), "/Audio/MI2.MID");
        Uri Note=Uri.fromFile(dir);

        RingtoneManager.getDefaultType(Note);
        RingtoneManager.isDefault(Note);
        RingtoneManager.setActualDefaultRingtoneUri(getApplicationContext(), RingtoneManager.TYPE_RINGTONE, Note);

But It is setting my phone's default ringtone..

JiTHiN
  • 6,450
  • 5
  • 40
  • 68

1 Answers1

0

Have you checked through other posts? There are a few on this topic. On a quick search this one came up with some code and a quick tip on permissions too! How can I change the ringtone in android programmatically? :)

Community
  • 1
  • 1
fantasitcalbeast
  • 5,105
  • 4
  • 36
  • 67