I am working on an Android app. I want to send images and videos from my server to my Android app. GCM allows only 4kb of data to be sent, but media files are generally of larger size so how to do this?
You don't send it over to your client using gcm. You use gcm to inform the client about new stuff to fetch from your server / the cloud.
Read the gcm-docs and the "send-to-sync" idea under advanced topics.
Check the Google IO web-api video (~ minute 30) for the big picture Google I/O 2012 and the files in android-sdk/extras/google/gcm/samples
I actually wrote two blogs posts on this. The first one shows how to send a link in the payload and then download the files using the URL.
The second shows how to send small images as part of the 4K payload.
Store the media (images, video etc.) on your server & send link of them through GCM to android app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With