java.lang.Object | |
↳ | com.samsung.android.knox.datetime.NtpInfo |
NTP(Network Time Protocol) info class. This class provides parameter for administrator to set and
configure NTP server settings in the device. This class is always initialized with the system's
default values so administrator can use them as a reference. If there is no intention to modify a
specific field leave it as it is or explicitly set NOT_SET_INT
or
NOT_SET_LONG
to that field. Note that 0
is considered as not set, so
value should be greater than 0
to be used.
API level 17 |
MDM 5.5 |
Global Scope |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | NOT_SET_INT | Value to indicate field of type integer is not set and default system value
should be used instead. |
|||||||||
long | NOT_SET_LONG | Value to indicate field of type long is not set and default system value should
be used instead. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Default constructor of this class.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get the maximum of try again attempts to connect to the NTP server.
| |||||||||||
Get the polling interval the device tries to re-connect to the NTP server.
| |||||||||||
Get the shorter polling interval for retry connection.
| |||||||||||
Returns the NTP server set or
null if none. | |||||||||||
Deprecated
in API level 33
NOTE: This API is not available since Android 11. | |||||||||||
Get the timeout set for NTP server connection.
| |||||||||||
Set the maximum of try again attempts to connect to the NTP server.
| |||||||||||
Set the interval of time for the the device to re-connect the NTP server to update its time.
| |||||||||||
Set the shorter interval the device will wait to try again to connect to NTP server after
previous connection attempt timed out.
| |||||||||||
Set NTP server hostname/IP adress.
| |||||||||||
Deprecated
in API level 33
NOTE: This API is not available since Android 11. | |||||||||||
Set the timeout for connection to the NTP server.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
|
Value to indicate field of type integer
is not set and default system value
should be used instead. Can be used to reset fields.
API level 17 |
MDM 5.5 |
Value to indicate field of type long
is not set and default system value should
be used instead. Can be used to reset fields.
API level 17 |
MDM 5.5 |
Default constructor of this class. It will initialize the parameters with system's default values.
context | Context of calling application. |
---|
API level 17 |
MDM 5.5 |
Get the maximum of try again attempts to connect to the NTP server.
NOT_SET_INT
if not set.API level 17 |
MDM 5.5 |
Get the polling interval the device tries to re-connect to the NTP server.
NOT_SET_LONG
if not set.API level 17 |
MDM 5.5 |
Get the shorter polling interval for retry connection.
NOT_SET_LONG
if not set.API level 17 |
MDM 5.5 |
Returns the NTP server set or null
if none.
null
if none was set.API level 17 |
MDM 5.5 |
Deprecated
in API level 33
NOTE: This API is not available since Android 11.
Get the time error threshold.
NOT_SET_INT
if not set.API level 17 |
MDM 5.5 |
Get the timeout set for NTP server connection.
NOT_SET_LONG
if not set.API level 17 |
MDM 5.5 |
Set the maximum of try again attempts to connect to the NTP server.
maxAttempts | Maximum number of try again attempts. |
---|
API level 17 |
MDM 5.5 |
Set the interval of time for the the device to re-connect the NTP server to update its time.
pollInterval | The polling interval in milliseconds. |
---|
API level 17 |
MDM 5.5 |
Set the shorter interval the device will wait to try again to connect to NTP server after previous connection attempt timed out.
polInterShorter | The polling interval shorter in milliseconds. |
---|
API level 17 |
MDM 5.5 |
Set NTP server hostname/IP adress.
server | The server must be in format of a machine name as "2.android.pool.ntp.org" or a
textual representation of its IP address (e.g 192.168.0.2). Set null
to revert to default android server. |
---|
API level 17 |
MDM 5.5 |
Deprecated
in API level 33
NOTE: This API is not available since Android 11.
Set the time error threshold. If the difference between current device time and NTP retrieved time is greater than the threshold the time will be updated.
timeErrorThreshould | The time error threshold in milliseconds. |
---|
API level 17 |
MDM 5.5 |
Set the timeout for connection to the NTP server.
timeout | The timeout in milliseconds. |
---|
API level 17 |
MDM 5.5 |