-3

what is the best practice to send data to client android application using web-server or Google cloud management or web services . i want to send SVGfile to android client application from my pc or my server.

2 Answers2

1

Instead of sending data to the client (which assumes your client becomes a server somehow listening to that kind of data) I would just trigger an event on the client which will then download the data from the server.

So let's assume these two options:

  1. your client queries your webserver every X minutes to see if there is something (new) to download
  2. you receive a push message via Google cloud 2 device message system

Both will then trigger a download routine. Here is an example how to download an image via URL How to load an ImageView by URL in Android?

Community
  • 1
  • 1
André Diermann
  • 2,725
  • 23
  • 28
0

To send data in this direction (from PC to Android), you need Google Cloud Messaging:

http://developer.android.com/google/gcm/index.html

because the app in client may be "sleeping"

mromer
  • 1,867
  • 1
  • 13
  • 18