title: How to read and write URI type using sharedPreferences
body: <p>Actually I want to know, how can I read and write URI using <code>sharedPreferences</code>. I mean to say that suppose I have an int value, e.g.:</p>
  <pre><code>int x = 10;
  </code></pre>
  <p><strong>Then for write date using <code>sharedPrferences</code> I used following code</strong></p>
  <pre><code>SharedPreferences preferencesWrite  = getSharedPreferences(&quot;myPreferences&quot;, 0);
  
  SharedPreferences.Editor editor  = preferencesWrite.edit();
  
  editor.putInt(&quot;value&quot;, x);
  
  editor.commit();
  </code></pre>
  <p><strong>And similarly for reading data code I used is</strong></p>
  <pre><code>x = preferencesRead.getInt(&quot;value&quot;, 0);
  </code></pre>
  <p><strong>Now if I declared</strong> <code>Uri calenEvent;</code>
  Then how can I read and write it to the register? If anyone knows, please help me to solve this out.</p>