Country Code component returns me to US instead of my own respective Country

Hello koders I have my app which is installed by more than 2000 users from more than 100 countries.

Before creating this topic I have searched first and found this similar topic which is already closed but it also didn’t solve my problem

I want to know which country is my user from for example I have tested mine but I found myself in US instead of my own country as I can see from Onesignal.com

Here are my blocks


Then I get these results
:point_down:t2: :point_down:t2: :point_down:t2: :point_down:t2:

Instead of getting results like this from onesignal.com
:point_down:t2: :point_down:t2:

I would like to know maybe this block has a bug and if so which way can I use to solve this problem?

Lily

You should use device location to find out the country because that happens often due to poor personalization on some devices. But still as you suggested, it could also be a bug, either in the companion or the extension.

alternatively you could try the telephonymanager extension and its SimCountryIsoCode method, however it requires READ_PHONE_STATE permission

https://puravidaapps.com/telephonymanager.php

Taifun

1 Like