Android Question Get Country

tufanv

Expert
Licensed User
Longtime User
Using gps in an finance app will probably be not good. :(
You could use the GPS to determine whether you are in Turkey or not.
However, the default language of the device will probably overrule almost everything. You would need to write specific code to force your app to behave as if it was set to Turkey.
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
You can use FusedLocationProvider to get the approximate location.
should i use
GetLastKnownLocation ?

if yes , how will it give the location ? if it is as lat and lon it will be hard to use it ?
 
Upvote 0

Daniel-White

Active Member
Licensed User
Longtime User
Something like this, I am not sure is what are you looking for ?

B4X:
    Dim sim As SimCard
    sim.Initialize
    Dim Country As String
    Country=sim.GetNetworkCountryIso
    If Country="gb"  Then  ToastMessageShow("Put this message in English you are probably  in UK, by sure speak English",True)
    If Country="ve"  Then  ToastMessageShow("Coloca este mensaje en Español si eres Venzolano.",True)
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
Something like this, I am not sure is what are you looking for ?

B4X:
    Dim sim As SimCard
    sim.Initialize
    Dim Country As String
    Country=sim.GetNetworkCountryIso
    If Country="gb"  Then  ToastMessageShow("Put this message in English you are probably  in UK, by sure speak English",True)
    If Country="ve"  Then  ToastMessageShow("Coloca este mensaje en Español si eres Venzolano.",True)
Yes this is what i need. But which lib i have to use with this as there is nothing to dim for simcard.
 
Upvote 0
Top