Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send media from server to android app?

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?

like image 268
user1918034 Avatar asked Dec 20 '12 07:12

user1918034


3 Answers

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

like image 180
Lin-Art Avatar answered Sep 20 '22 02:09

Lin-Art


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.

like image 36
selsine Avatar answered Sep 20 '22 02:09

selsine


Store the media (images, video etc.) on your server & send link of them through GCM to android app.

like image 24
Vishal Pawar Avatar answered Sep 20 '22 02:09

Vishal Pawar