how to encoded img(Base64) from android to mysql with JSON
<p>I got problem when I convert bitmap to string for encode to JSONObject this my code</p>

<p>// convert bitmap to String</p>

<pre><code>public String convertToString(Bitmap bitmap){
    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    bitmap = Bitmap.createScaledBitmap(bitmap, 480, 320, true);
    bitmap.compress(Bitmap.CompressFormat.PNG, 90, stream);
    byte[] arr_img = stream.toByteArray();
    String img_str = Base64.encodeToString(arr_img, Base64.DEFAULT);
    return img_str;
}
</code></pre>

<p>// than upload code here</p>

<pre><code>public JSONObject userReport(String imag_ref){
    //building parameters
    List&lt;NameValuePair&gt; params = new ArrayList&lt;NameValuePair&gt;();
    params.add(new BasicNameValuePair(TAG_IMAGE_REFERENCE, imag_ref));


    JSONObject json = jsonParser.makeHttpRequest(NewReportURL, "POST", params);
    return json;
}
</code></pre>

<p>I can't upload image string to mysql server please help me</p>
