title: Simple way to create a new file in Android
body: <p>I have been trying to create a new file, the data is in an Array list:</p>
  
  <pre><code>ArrayList&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
  
  nameValuePairs.add(new BasicNameValuePair("photos", image_str));
  nameValuePairs.add(new BasicNameValuePair("UserId", userId));
  </code></pre>
  
  <p>I want to create a file storing <code>nameValuesPairs</code>, which is an ArrayList.</p>
  
  <p>How do I create a file in Android??? Preferably an easy way, using array, photos, and others.</p>