Class ClockCtrl

java.lang.Object
com.unitech.api.clock.ClockCtrl

public class ClockCtrl extends Object
The type Clock ctrl.
  • Field Details

  • Constructor Details

    • ClockCtrl

      public ClockCtrl(android.content.Context context)
      Instantiates a new Clock ctrl.
      Parameters:
      context - the context
  • Method Details

    • setNTPServer

      public android.os.Bundle setNTPServer(String NTPServerURL)
      Set ntp server .
      Parameters:
      NTPServerURL - the ntp server url (String)
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • getNTPServer

      public android.os.Bundle getNTPServer()
      Get ntp server.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
      String ntpServerUrl = bundle.getString("NtpServer");
    • setTimeMode

      public android.os.Bundle setTimeMode(int mode)
      Set time mode.
      Parameters:
      mode - , 0 : manual mode, 1 : auto mode (int)
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • getTimeMode

      public android.os.Bundle getTimeMode()
      Get time mode.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
      int timeMode = bundle.getInt(" TimeMode ")
      0 : manual mode
      1 : auto mode
    • setManualDate

      public android.os.Bundle setManualDate(String date)
      Set manual date.
      Parameters:
      date - the date, String, ex: 31/12/2019 (day/month/year)
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • setManualTime

      public android.os.Bundle setManualTime(String time)
      Set manual time.
      Parameters:
      time - the time , String, ex: 23:59 (hour/minute) or 23:59:59 (hour/minute/second, with DMService ver1.2.7 after)
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • getManualTime

      public android.os.Bundle getManualTime()
      Get manual time.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
      String manualTime= bundle.getString("ManualTime");
      timeformat: dd/MM/yyyy HH:mm (or HH:mm:ss with DMService 1.2.7 after)
    • setTimeZoneMode

      public android.os.Bundle setTimeZoneMode(int mode)
      Set time zone mode.
      Parameters:
      mode - 0 : manual mode, 1 : auto mode (int)
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • getTimeZoneMode

      public android.os.Bundle getTimeZoneMode()
      Get time zone mode bundle.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
      int timeZoneMode = bundle.getInt("TimeZoneMode");
      0 : manual mode
      1 : auto mode
    • setTimeZone

      public android.os.Bundle setTimeZone(String timeZone)
      Set time zone bundle.
      Parameters:
      timeZone - the time zone (String)
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • getTimeZone

      public android.os.Bundle getTimeZone()
      Get time zone bundle.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
      String timeZone = bundle.getString("TimeZone");
    • setTimeFormat

      public android.os.Bundle setTimeFormat(int timeFormat)
      Set time format bundle.
      Parameters:
      timeFormat - the time format , 24 or 12 (int)
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • getTimeFormat

      public android.os.Bundle getTimeFormat()
      Get time format bundle.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
      int timeFormat = bundle.getInt("TimeFormat"); (12 or 24)