Hi
i'm trying to determine date and time only from a usb gps connected to my mk808b rooted dongle.
so.
i could determine the date and time now. I need to set it on the system.
1) Into another program (monkey-x) i could automatically set the date directly from java. How to convert this to b4a code ?
2) i use DateUtils. what's the code/algo/method of DateUtils.UnixTimeToTicks(UnixTime) ? I need to understand how to code this next into my monkey-x program. (Unix time to ticks)
Many thanks !
i'm trying to determine date and time only from a usb gps connected to my mk808b rooted dongle.
so.
i could determine the date and time now. I need to set it on the system.
1) Into another program (monkey-x) i could automatically set the date directly from java. How to convert this to b4a code ?
B4X:
static void setdate(String an, String mois, String jour, String heure, String minutes, String secondes)
{
try
{
// date -s YYYYMMDD.HHMMSS
Runtime.getRuntime().exec(new String[]{ "su", "-c", "date -s " + an + mois + jour + "." + heure + minutes + secondes });
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
2) i use DateUtils. what's the code/algo/method of DateUtils.UnixTimeToTicks(UnixTime) ? I need to understand how to code this next into my monkey-x program. (Unix time to ticks)
Many thanks !