title: ContentUris.withAppendedId method in android content provider can i leave the "id" part of perameter blank?
body: <p>for the following method</p>
  
  <pre><code> Uri uri = ContentUris.withAppendedId((MediaStore.Images.Media.EXTERNAL_CONTENT_URI, id);
  </code></pre>
  
  <p>i have read many examples but none of the examples tell me what to do with "id" part of the perameter,  i don't want to assign which row because that will change depending of what row the specific image is stored in.  so i can't hard code "id".  how to deal with this? and can i leave the id as null?</p>
  
  <p>edit</p>
  
  <p>i just found this a few minutes ago from a website, <a href="http://www.grokkingandroid.com/android-tutorial-using-content-providers/" rel="nofollow">http://www.grokkingandroid.com/android-tutorial-using-content-providers/</a></p>
  
  <pre><code>     values.clear();
   values.put(Words.WORD, "Zaphod");
   Uri uri = ContentUris.withAppendedId(Words.CONTENT_URI, id);
   long noUpdated = resolver.update(uri, values, null, null)
  </code></pre>
  
  <p>here is the quote from the author, "Since I changed only one record, a URI with an appended ID is sufficient. But if you want to update multiple values, you should use the normal URI and a selection clause."</p>
  
  <p>so he says to use a "normal URI and selection clause" so how do i do that?</p>
  
  <p>this is my selection statement:</p>
  
  <pre><code>     String selection = MediaStore.Images.Media.DATA + "='" + filename +"'";
  </code></pre>
  
  <p>where "filename" is a string variable that varies depending on the image selected, for example, in this case /mnt/sdcard/pic09.png</p>