ilan Expert Licensed User Longtime User May 13, 2017 #1 hi how can i know if the device system clock is set to 12h or 24h? i try it like this: B4X: Dim jo As JavaObject = DateTime jo.InitializeContext Log(jo.GetField("is24HourFormat")) but i get an error (java.lang.RuntimeException: Field: is24HourFormat not found in: www.sagital.mysalarynew.main) from what i see it should be available in DateFormat object but how to do it in b4a? https://developer.android.com/reference/android/text/format/DateFormat.html thanks, ilan EDIT: maybe this may be helpful: http://www.programcreek.com/java-ap....text.format.DateFormat&method=is24HourFormat Last edited: May 13, 2017
hi how can i know if the device system clock is set to 12h or 24h? i try it like this: B4X: Dim jo As JavaObject = DateTime jo.InitializeContext Log(jo.GetField("is24HourFormat")) but i get an error (java.lang.RuntimeException: Field: is24HourFormat not found in: www.sagital.mysalarynew.main) from what i see it should be available in DateFormat object but how to do it in b4a? https://developer.android.com/reference/android/text/format/DateFormat.html thanks, ilan EDIT: maybe this may be helpful: http://www.programcreek.com/java-ap....text.format.DateFormat&method=is24HourFormat
mangojack Well-Known Member Licensed User Longtime User May 14, 2017 #2 Try .. Phone.GetSettings("time_12_24") 'To check if 12 or 24h display Is enabled on your device. Upvote 0
ilan Expert Licensed User Longtime User May 14, 2017 #3 mangojack said: Try .. Phone.GetSettings("time_12_24") 'To check if 12 or 24h display Is enabled on your device. Click to expand... thank you this is working i am trying to get the list of available keys for the .GetSettings method but i get a 404 error (page was not found) where can i get the list of all keys? thank you Upvote 0
mangojack said: Try .. Phone.GetSettings("time_12_24") 'To check if 12 or 24h display Is enabled on your device. Click to expand... thank you this is working i am trying to get the list of available keys for the .GetSettings method but i get a 404 error (page was not found) where can i get the list of all keys? thank you
mangojack Well-Known Member Licensed User Longtime User May 14, 2017 #4 https://developer.android.com/reference/android/provider/Settings.System.html Last edited: May 14, 2017 Upvote 0