Class ClockCtrl


  • public class ClockCtrl
    extends java.lang.Object
    The type Clock ctrl.
    • Constructor Summary

      Constructors 
      Constructor Description
      ClockCtrl​(android.content.Context context)
      Instantiates a new Clock ctrl.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      android.os.Bundle getManualTime()
      Get manual time.
      android.os.Bundle getNTPServer()
      Get ntp server.
      android.os.Bundle getTimeFormat()
      Get time format bundle.
      android.os.Bundle getTimeMode()
      Get time mode.
      android.os.Bundle getTimeZone()
      Get time zone bundle.
      android.os.Bundle getTimeZoneMode()
      Get time zone mode bundle.
      android.os.Bundle setManualDate​(java.lang.String date)
      Set manual date.
      android.os.Bundle setManualTime​(java.lang.String time)
      Set manual time.
      android.os.Bundle setNTPServer​(java.lang.String NTPServerURL)
      Set ntp server .
      android.os.Bundle setTimeFormat​(int timeFormat)
      Set time format bundle.
      android.os.Bundle setTimeMode​(int mode)
      Set time mode.
      android.os.Bundle setTimeZone​(java.lang.String timeZone)
      Set time zone bundle.
      android.os.Bundle setTimeZoneMode​(int mode)
      Set time zone mode.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClockCtrl

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

      • setNTPServer

        public android.os.Bundle setNTPServer​(java.lang.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​(java.lang.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​(java.lang.String time)
        Set manual time.
        Parameters:
        time - the time , String, ex: 23:59 (hour/minute)
        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
      • 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​(java.lang.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)