Package com.unitech.api.clock
Class ClockCtrl
- java.lang.Object
-
- com.unitech.api.clock.ClockCtrl
-
public class ClockCtrl extends java.lang.ObjectThe type Clock ctrl.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBUNDLE_ERROR_CODEstatic java.lang.StringBUNDLE_ERROR_MSGstatic intRESULT_CODE_ERRORstatic intRESULT_CODE_SUCCESS
-
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.BundlegetManualTime()Get manual time.android.os.BundlegetNTPServer()Get ntp server.android.os.BundlegetTimeFormat()Get time format bundle.android.os.BundlegetTimeMode()Get time mode.android.os.BundlegetTimeZone()Get time zone bundle.android.os.BundlegetTimeZoneMode()Get time zone mode bundle.android.os.BundlesetManualDate(java.lang.String date)Set manual date.android.os.BundlesetManualTime(java.lang.String time)Set manual time.android.os.BundlesetNTPServer(java.lang.String NTPServerURL)Set ntp server .android.os.BundlesetTimeFormat(int timeFormat)Set time format bundle.android.os.BundlesetTimeMode(int mode)Set time mode.android.os.BundlesetTimeZone(java.lang.String timeZone)Set time zone bundle.android.os.BundlesetTimeZoneMode(int mode)Set time zone mode.
-
-
-
Field Detail
-
BUNDLE_ERROR_CODE
public static final java.lang.String BUNDLE_ERROR_CODE
- See Also:
- Constant Field Values
-
BUNDLE_ERROR_MSG
public static final java.lang.String BUNDLE_ERROR_MSG
- See Also:
- Constant Field Values
-
RESULT_CODE_ERROR
public static final int RESULT_CODE_ERROR
- See Also:
- Constant Field Values
-
RESULT_CODE_SUCCESS
public static final int RESULT_CODE_SUCCESS
- See Also:
- Constant Field Values
-
-
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)
-
-