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,548
  • 5
  • 43
  • 69

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
laminatefish
  • 5,197
  • 5
  • 38
  • 70