'Getting user's Play Store country
There are many ways how to get user's country trough location services. However country obtained this way does not always correspond with the country associated with the user's Play Store.
Is there a way to get user's Play Store country directly via code?
Solution 1:[1]
There is no direct way you can get the play store country in the Android SDK.
But you can use the getSkuDetails() method in Android In-app Billing API. It will return you a JSON.
In the JSON look for the field price_currency_code to get the currency code of the currency being used in the play store account. From the currency, you can get the country.
See here for details - https://developer.android.com/google/play/billing/billing_reference.html#getSkuDetails
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Asutosh Panda |