How to get the time from the Internet in Android Studio?

0

I am using Android Studio for the API 19 . I want to get the time from the internet and not from the device, my application ("game") depends in part on the date (day, hour, minute), and changing the date of the device would be "cheating".

I have 2 options in mind

  • I think you can directly request google a json with the Internet date, but I do not know how.
  • Download a file (php, html, etc.) from a page that contains the data I'm looking for, and then I search for it and extract it from a string.
  • What do you recommend me to use (or what other alternative) and what code can I use?

    Thank you.

        
    asked by Gustavo Lozano 08.05.2017 в 06:53
    source

    0 answers