title: How to update mp3 song to Ringtone without delete,insert
body: <p>I have tried to update mp3 song to ringtone.</p>
  
  <pre><code>RingtoneManager ringtoneManager = new RingtoneManager(Album_fragment.this.getActivity());
  
          String str_song_name = "";
          try{
              str_song_name =  Player_screen_main_activity.list_all_songs.get(position_ringtone).get("display_name");
          }catch (Exception e){
              e.printStackTrace();
          }
  
          if (lang.equalsIgnoreCase("phone")) {
              try {       
  
                  File ringFile = new File(Player_screen_main_activity.list_all_songs.get(position_ringtone).get("data"));
  
                  //File ringFile = new File(list_all_songs2.get(position_ringtone).get("data"));
  
                  ContentValues values = new ContentValues();
                  values.put(MediaStore.MediaColumns.DATA, ringFile.getAbsolutePath());
                  //values.put(MediaStore.MediaColumns.TITLE, "ring_Phone_MusicCutter");
  
  
                  values.put(MediaStore.MediaColumns.TITLE, str_song_name);
  
                  values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mp3");
                  values.put(MediaStore.MediaColumns.SIZE, ringFile.length());
                  values.put(MediaStore.Audio.Media.ARTIST, com.musicplayer.player.mp3cutter.R.string.app_name);
                  values.put(MediaStore.Audio.Media.IS_RINGTONE, true);
                  values.put(MediaStore.Audio.Media.IS_NOTIFICATION, false);
                  values.put(MediaStore.Audio.Media.IS_ALARM, false);
                  values.put(MediaStore.Audio.Media.IS_MUSIC, true);
                  Uri uri = MediaStore.Audio.Media.getContentUriForPath(ringFile.getAbsolutePath());
  
                //  getActivity().getContentResolver().delete(uri, MediaStore.MediaColumns.DATA + "=\"" + ringFile.getAbsolutePath() + "\"", null);
  
               //   Uri newUri = getActivity().getContentResolver().insert(uri, values);
  
                 getApplicationContext().getContentResolver().update(uri , values, selection, arg);
                  try {
                      ringtoneManager.setActualDefaultRingtoneUri(getActivity(), RingtoneManager.TYPE_RINGTONE, uri );
                  } catch (Throwable t) {
  
                  }
  
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
  </code></pre>
  
  <p>could not update to phone ring tone ,i have check in Setting  <code>Phone ringtone</code> Name, not update with set ring tone name.</p>