title: What is the best way to store image from Android app to Datastore/Google Cloud Storage?
body: <p>I'm trying to store a Google Maps snapshot (from Android) into the Datastore but i'm experiencing some troubles:</p>
  
  <p>The snapshot is a bitmap converted to a byte array that i stringify but it crashed because of low surrogate character.</p>
  
  <p>I solve this by changing <code>StringUtils.newStringUtf8(byteAray)</code> to <code>new String(byteArray, Charset.forName("ISO-8859-15"))</code>.</p>
  
  <p>Now it won't save my entity because "error 413: the request is too long".</p>
  
  <p>For information, here's how i get the byte array:</p>
  
  <pre><code>    ByteArrayOutputStream stream = new ByteArrayOutputStream();
      bitmap.compress(Bitmap.CompressFormat.JPEG, 50, stream);
      byte [] bytes = stream.toByteArray();
  </code></pre>
  
  <p>So how can i store that bitmap efficiently to the Datastore (or an other solution) to be able to get it back elsewhere in my Android app ?</p>