title: ContentResolver.insert always returning null
body: <p>I am trying to set a custom ringtone by pressing a button but getting null from ContentResolver's insert method. Following is the code resopnsible for setting the ringtone. I checked on stackoverflow itself and some users said its working for them but in my case I get the variable "newUri" as null</p>
  
  <p>The sound file gets created at the desired location so I know that "newSoundFile" is ok.
  Upon printing "values" variable in log gives the following.</p>
  
  <p>Values are title=my ringtone is_notification=true mime_type=audio/mp3 is_alarm=true is_ringtone=true _size=8733 is_music=false artist=None _data=/mnt/sdcard/media/ringtone/myringtone.mp3</p>
  
  <pre><code>try
  {
       uri = MediaStore.Audio.Media.getContentUriForPath(newSoundFile.getAbsolutePath());
       Log.d("Test", uri.toString());
       ContentValues values = new ContentValues();
       values.put(MediaStore.MediaColumns.DATA, newSoundFile.getAbsolutePath());
       values.put(MediaStore.MediaColumns.TITLE, "my ringtone");
       values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mp3");
       values.put(MediaStore.MediaColumns.SIZE, newSoundFile.length());
       values.put(MediaStore.Audio.Media.ARTIST, "None");
       values.put(MediaStore.Audio.Media.IS_RINGTONE, true);
       values.put(MediaStore.Audio.Media.IS_NOTIFICATION, true);
       values.put(MediaStore.Audio.Media.IS_ALARM, true);
       values.put(MediaStore.Audio.Media.IS_MUSIC, false);
       Log.d("Test","Values are "+values.toString());
       newUri = mCr.insert(uri, values);
  }
  catch (Exception ee)
  {
       Log.d("Test", "Exception is " + ee);
  }
  if(newUri == null)
      Log.d("Test", "newUri is Null");
   else
      Log.d("Test", "newUri is "+newUri.toString());
  </code></pre>