title: Android Media store issue: Inserting new playlist returns null URI
body: <p>I implemented a method for creating playlist in the Media Store using the method below:</p>
  
  <pre><code>public static long createPlaylist(ContentResolver resolver, String name) {
      ContentValues values = new ContentValues(1);
      values.put(MediaStore.Audio.Playlists.NAME, name);
      Uri uri = resolver.insert(MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI, values);
      if (uri == null) {
          throw new Exception(
              "Failed to insert playlist: " + values);
      }
  
      String idString = uri.getLastPathSegment();
      if (idString == null) {
           throw new Exception(
                "Failed to parse uri last segment: " + uri);
      }
  
      return Long.parseLong(idString);
  }
  </code></pre>
  
  <p>The method returns an id of newly created playlist. It works perfect on all devices except Nokia 3.1 Android 9.
  It fails by returning null URI when inserting values in Content resolver.</p>
  
  <p>I also tried to insert values like in the code below:</p>
  
  <pre><code>ContentValues values = new ContentValues(3);
  values.put(MediaStore.Audio.Playlists.NAME, name);
  values.put(MediaStore.Audio.Playlists.DATE_ADDED, now);
  values.put(MediaStore.Audio.Playlists.DATE_MODIFIED, now);
  </code></pre>
  
  <p>What could be the reason for that? I thought it should be working same way on all devices cause of the common implementation of Media Store in the framework.</p>
  
  <p>Thanks for any help in advance.</p>