Q quaker Member Licensed User Longtime User Oct 11, 2012 #1 HI all is there any way to change system date/system time from a user application using basic for android? I have seen that using java is possible using this thread: Short Answer It's possible and has been done. You need android.permission.SET_TIME. Afterward use the AlarmManager via Context.getSystemService(Context.ALARM_SERVICE) and it s method setTime(). Snippet for setting the time to 2010/1/1 12:00:00 from an Activity or Service: Calendar c = Calendar.getInstance(); c.set(2010, 1, 1, 12, 00, 00); AlarmManager am = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE); am.setTime(c.getTimeInMillis()); If you which to change the timezone, the approach should be very similar (see android.permission.SET_TIME_ZONE and setTimeZone) source:How to set mobile system time and date in android? - Stack Overflow
HI all is there any way to change system date/system time from a user application using basic for android? I have seen that using java is possible using this thread: Short Answer It's possible and has been done. You need android.permission.SET_TIME. Afterward use the AlarmManager via Context.getSystemService(Context.ALARM_SERVICE) and it s method setTime(). Snippet for setting the time to 2010/1/1 12:00:00 from an Activity or Service: Calendar c = Calendar.getInstance(); c.set(2010, 1, 1, 12, 00, 00); AlarmManager am = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE); am.setTime(c.getTimeInMillis()); If you which to change the timezone, the approach should be very similar (see android.permission.SET_TIME_ZONE and setTimeZone) source:How to set mobile system time and date in android? - Stack Overflow
Erel B4X founder Staff member Licensed User Longtime User Oct 12, 2012 #2 You missed the most important part: If you CAN gain the permission either because you rooted your phone or built and signed your own platform image, read on. Click to expand... Upvote 0
You missed the most important part: If you CAN gain the permission either because you rooted your phone or built and signed your own platform image, read on. Click to expand...