Hi,
I think that it is not possible on a non rooted phone, only the system user can change the system time, see http://stackoverflow.com/questions/1332269/how-to-set-mobile-system-time-and-date-in-android for more information.... I'm curious, what the b4a experts will say to that....
No, that´s java.see your link but its in C Language
No, that´s java.
You need to write a wrapper-library for this to be used in B4A or maybe you can use the lib Root-CMD to call the shell commands posted on your link
shell_cmd("date -s " & IntToStr4(date_year) & _
IntToStr2(date_month) & _
IntToStr2(date_day) & "." & _
IntToStr2(time_hour) & _
IntToStr2(time_min) & "00")
Sub IntToStr2(val1 As Int) As String
Dim str1 As String
str1 = ""
If val1 < 10 Then
str1 = str1 & "0"
End If
str1 = str1 & val1
Return str1
End Sub
Sub IntToStr4(val1 As Int) As String
Dim str1 As String
str1 = ""
If val1 < 1000 Then
str1 = str1 & "0"
End If
If val1 < 100 Then
str1 = str1 & "0"
End If
If val1 < 10 Then
str1 = str1 & "0"
End If
str1 = str1 & val1
Return str1
End Sub
Sub shell_cmd(Command_in As String) As String
Dim Result As Int
Runner = File.Combine(File.DirInternalCache, "runner")
Command = File.Combine(File.DirInternalCache, "command")
File.WriteString(File.DirInternalCache, "runner", "su < " & Command)
File.WriteString(File.DirInternalCache, "command", Command_in & CRLF & "exit")
'Any commands via crlf, and exit at end
StdOut.Initialize
StdErr.Initialize
Result = Ph.Shell("sh", Array As String(Runner), StdOut, StdErr)
'Msgbox(StdOut.tostring, "")
Return StdOut.tostring
End Sub