2

I want to build a messenger in Android to send binary files, i.e. "user A" sends "file 1" to "user B". At first I wanted to use Google Cloud Messenger, but it only works with text and is not meant to be used for files transfer. Is there a similar cloud service from Google to send also binary files?

  • 3
    You can use the blobstore to upload the file then share the link to user b. https://developers.google.com/appengine/docs/python/blobstore/ – Ryan Sep 15 '14 at 16:33
  • I saw this solution before. Is using blobstore a legitimate way of using the GAE/GCM APIs? –  Sep 15 '14 at 17:50
  • This might help: http://stackoverflow.com/questions/8000114/how-to-send-image-data-to-server-from-android – Ryan Oct 13 '14 at 13:14

1 Answers1

0

If the binary files are small, you could maybe send them over the Endpoints service, with a message containing a ByteField field. You'd have to encode it using a base64encode before sending it, and decode it the same way.

If the binary files are bigger, you should probably follow Ryan B's advice and make user A upload it to the blobstore, then send the blobstore link to userB for him to download it.

In both cases, the app engine server would merely act as a "mirror".

You could also give the XMPP implementation of google cloud a look, there's maybe something in there about uploading and downloading binary files.

Hadrien Titeux
  • 450
  • 2
  • 11