Ringtone saving but have to set manually
<p>I have a soundboard app and i am wanting to get the sounds to save as ringtone or notification when the button is long clicked which works fine but then the user would have to go and set the ringtone in the sound tab.</p>

<p>I would like if its possible for the ringtone to save and be set as defualt so it overrides the current ringtone that is being used is this possible.</p>

<p>Thanks in advance.</p>

<pre><code>sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://"+path+filename))); 

 File k = new File(path, filename);   
 ContentValues values = new ContentValues();   
 values.put(MediaStore.MediaColumns.DATA, k.getAbsolutePath());   
 values.put(MediaStore.MediaColumns.TITLE, "Benton");   
 values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/ogg");   
 values.put(MediaStore.Audio.Media.ARTIST, "weee");   
 values.put(MediaStore.Audio.Media.IS_RINGTONE, true);   
 values.put(MediaStore.Audio.Media.IS_NOTIFICATION, false);   
 values.put(MediaStore.Audio.Media.IS_ALARM, true);   
 values.put(MediaStore.Audio.Media.IS_MUSIC, false);    

 //Insert it into the database
 this.getContentResolver().insert(MediaStore.Audio.Media.getContentUriForPath(k.getAbsolutePath()), values);

 return true; 
}
</code></pre>
