title: getRealPathFromURI not working anymore
body: <p>I've had this code in my app for a few years now and it stopped working on new versions on Android.  Haven't programmed in years so I'm rusty.  Can someone please point to a quick fix to check api/sdk levels?</p>
  
  <pre><code>public String getRealPathFromURI(Uri contentUri) {
          String res = null;
          String[] proj = { MediaStore.Images.Media.DATA };
          Cursor cursor = getContentResolver().query(contentUri, proj, null, null, null);
          if(cursor.moveToFirst()){;
          int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
          res = cursor.getString(column_index);
          }
          cursor.close();
          return res;
          }
  </code></pre>