0

Do you know how to set an Android or iPhone device's datetime using a feaure within your mobile app that you built using Delphi XE5? This should of course happen at runtime.

Johan
  • 74,508
  • 24
  • 191
  • 319
EKISEK
  • 35
  • 3

1 Answers1

1

Delphi offers no cross-platform way of setting the system time.

On iOS, you don't have access to the API for changing the time; that functionality is reserved for the OS.

On Android, you need elevated privileges, and then you can use AlarmManager.setTime. At that point, your problem is simply one of adapting the native Java techniques to Delphi. I assume that's pretty much the same for any API, so it's beyond the scope of this question.

Community
  • 1
  • 1
Rob Kennedy
  • 161,384
  • 21
  • 275
  • 467