1

I want to know if is there a way to change to a specified date, launch an intent of an app and seconds later, turn the automatic date programmatically.

  • Change System Date
  • Launch an intent
  • Turn back the automatic date of the carrier

Thanks, Could It be possible?

Víctor Martín
  • 3,352
  • 7
  • 48
  • 94

1 Answers1

1

Yes it is possible to get the time from the Network Provider. You may use this code. There are plenty of other solutions that you will find, if you Google it.

 LocationManager locMan = (LocationManager) activity.getSystemService(activity.LOCATION_SERVICE);
long networkTS = locMan.getLastKnownLocation(LocationManager.NETWORK_PROVIDER).getTime(); 
Rahul Sharma
  • 347
  • 1
  • 16