Pregunta

Simple question: is it possible to tell an Android phone to take a photo and send it (provided I have an appropriate client app installed), and all of that using only GCM? Or is there a size limit on the messages pushed from the phone?

¿Fue útil?

Solución

The GCM documentation doesn't say explicitelly what's the size limit for an upstream message (device to cloud), so it's safe to assume the same size limit applies for both upstream and downstream messages - i.e. 4k bytes.

Unlike a send-to-sync message, every "message with payload" (non-collapsible message) is delivered. The payload the message contains can be up to 4kb.

Therefore you can't use GCM to send a photo from your phone to your server. You could send a downstream message from your server to the app via GCM, and the broadcast receiver that handles that message can start an intent service that would take the photo, contact your server and upload to it the photo (not using GCM).

Otros consejos

As Eran said, its quite true. Please follow Google GCM Services: http://developer.android.com/google/gcm/index.html

And other related documentation can be found at: http://developer.android.com/google/gcm/gcm.html

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top