setClockTimeFormat

fun setClockTimeFormat(context: Context, timeValue: TimeFormat)

Sets Settings.System.TIME_12_24 to the time format setting determined by the timeValue parameter. This API Requires android.permission.WRITE_PERMISSIONS.

Parameters

context

the Context.

timeValue

the value to set as an enum. TimeFormat.CLOCK_12H for 12-hour clock format, TimeFormat.CLOCK_24H for 24-hour clock format.