Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support automatically report of country code in the UWP SDK #362

Closed
OpportunityLiu opened this issue Jun 26, 2017 · 4 comments
Closed

Support automatically report of country code in the UWP SDK #362

OpportunityLiu opened this issue Jun 26, 2017 · 4 comments

Comments

@OpportunityLiu
Copy link

Can we support getting this info automatically?
What about new Windows.Globalization.GeographicRegion().CodeTwoLetter?
It reports the user's home region.
https://docs.microsoft.com/en-us/uwp/api/Windows.Globalization.GeographicRegion

@guperrot
Copy link
Member

guperrot commented Jun 26, 2017

Hi, the country code is meant for geographical position, not culture/locale.

On Analytics we already report the culture/locale automatically and you can see it on the portal in Analytics > Audience > Languages.

Countries chart on the left is meant for actual geographical position.
On Android and iOS, we report country only if you have a mobile carrier at the moment.

The API you mentioned cannot be used to determine geographical position, it simply returns this:

capture

I am in Redmond, USA, not Antarctica, users can put whatever they want there.

@michael-hawker
Copy link

Any updates on this? I had a crash in my app as the docs didn't have a sample for this and the example I got elsewhere was invalid.

Is it possible to get the user's location for UWP without adding a capability to the app? It does seem like the Globalization API is going to be a rough approximation as I'd imagine most users who setup their PC in their own country would have this value set to their country? Are there stats on the changes people make to this setting and how often it differs from the real location?

@michael-hawker
Copy link

Also, according to the location docs that value can only be retrieved when the app is in the foreground, so the timing with when to set and start the App Center API would need to be carefully considered/documented.

@AnastasiaKubova
Copy link
Contributor

Hi there! We already have an AppCenter.SetCountryCode API for setting country code manually. Please see a code sample for how to do it.
I'm closing this issue but feel free to reopen it if you will have additional questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants