I am writing an application that shows the status of the application: online or not.

I do it this way: Android takes its time, sends it to the Server, where the script checks the time lag. If it is more than 1 minute, it gives offline.

Is there any way to make it possible for Android to have the time of my server? Is such a thing possible?

  • Why doesn't the server just send back its time to the android client? - Nofate
  • Serverer shows you online or not ??? I can otpryavit his time on the phone and back to send it to the server and check ... But this thing is used in practice? - elik
  • @elik it strongly depends on the number of clients. but the only reliable option is heartbeat. the client sends it to the server, and the server checks the clients all the time. server load will be great. to synchronize the clock on the server usually use ntp. - Mikhail Vaysman
  • @MikhailVaysman customers will be a maximum of 150. Is this a program for a company? - elik
  • server dependent. but you must understand that not only the server will be loaded, but also the clients. as the server will have to send status changes to all clients. having data you can calculate how much traffic will be. - Mikhail Vaysman

0