hookshy Well-Known Member Licensed User Longtime User Feb 7, 2014 #1 How can I detect the country of the device ! I want to disable rate button for a naughty country that votes only 2,3stars in spite of other countries that are more generous and votes 4 and 5 stars.
How can I detect the country of the device ! I want to disable rate button for a naughty country that votes only 2,3stars in spite of other countries that are more generous and votes 4 and 5 stars.
hookshy Well-Known Member Licensed User Longtime User Feb 7, 2014 #2 Code: Copy Sub Activity_Create(FirstTime As Boolean) Log(GetDefaultLanguage) End Sub Sub GetDefaultLanguage As String Dim r As Reflector r.Target = r.RunStaticMethod("java.util.Locale", "getDefault", Null, Null) Return r.RunMethod("getDisplayName") End Sub Hey hookshy check this code Upvote 0
Code: Copy Sub Activity_Create(FirstTime As Boolean) Log(GetDefaultLanguage) End Sub Sub GetDefaultLanguage As String Dim r As Reflector r.Target = r.RunStaticMethod("java.util.Locale", "getDefault", Null, Null) Return r.RunMethod("getDisplayName") End Sub Hey hookshy check this code
hookshy Well-Known Member Licensed User Longtime User Feb 7, 2014 #4 does someone know were to find language code ? is the language code same as country ? Upvote 0
JOANORSKY Member Licensed User Longtime User Apr 9, 2014 #5 hookshy said: does someone know were to find language code ? is the language code same as country ? Click to expand... This would be interesting.. not to use the extended description but only the language code such as ES, US, PT, FR, DE, etc.. ... did you found out how to do it? Upvote 0
hookshy said: does someone know were to find language code ? is the language code same as country ? Click to expand... This would be interesting.. not to use the extended description but only the language code such as ES, US, PT, FR, DE, etc.. ... did you found out how to do it?
JOANORSKY Member Licensed User Longtime User Apr 9, 2014 #6 Nevermind... just use java.util.Locale as reference and therefore replace Code: Copy Return r.RunMethod("getDisplayName") by.. Code: Copy Return r.RunMethod("getCountry") Hope it helps... Upvote 0
Nevermind... just use java.util.Locale as reference and therefore replace Code: Copy Return r.RunMethod("getDisplayName") by.. Code: Copy Return r.RunMethod("getCountry") Hope it helps...