Hello
I had to put a try catch in this function as is fails on a new device we got from china. Just thought you should know.
Regards
John.
I had to put a try catch in this function as is fails on a new device we got from china. Just thought you should know.
B4X:
Sub IsNightMode As Boolean
Dim ctxt As JavaObject
Try
ctxt.InitializeContext
Log(ctxt.RunMethodJO("getResources", Null).RunMethodJO("getConfiguration", Null).GetField("uiMode"))
Return Bit.And(ctxt.RunMethodJO("getResources", Null).RunMethodJO("getConfiguration", Null).GetField("uiMode"), 0x30) = 0x20
Catch
Return False
End Try
End Sub
Regards
John.