can't run
B4X:
Sub GetSystemTextColor As Int
Dim co As Int
Dim typedValue As JavaObject
typedValue.InitializeNewInstance("android.util.TypedValue", Null)
Dim theme As JavaObject = Activity
theme = theme.RunMethod("getTheme", Null)
Dim value As Boolean = theme.RunMethod("resolveAttribute", Array As Object(android.R.attr.textColorPrimary, typedValue, True))
If value Then
Return typedValue.GetField("data")
Else
Return Colors.Black '
End If
End Sub