Giter Site home page Giter Site logo

Project about appcenter-docs HOT 8 CLOSED

microsoftdocs avatar microsoftdocs commented on May 24, 2024
Project

from appcenter-docs.

Comments (8)

dparvin avatar dparvin commented on May 24, 2024 2

To get the country code automatically, you can use something like: AppCenter.SetCountryCode(RegionInfo.CurrentRegion.TwoLetterISORegionName);

from appcenter-docs.

jwargo avatar jwargo commented on May 24, 2024 1

@michael-hawker I'll ask the team to take a look - Don't forget, it's a public repo, we're happy to take pull requests. :-)

from appcenter-docs.

dhei avatar dhei commented on May 24, 2024

How can we help you? Do you have any issues or questions?

from appcenter-docs.

jwargo avatar jwargo commented on May 24, 2024

@tareq143 The comments feature of the docs is designed to enable customers to suggest changes to the docs or ask clarifying questions about the docs. If you need help with the product, please login to the App Center dashboard and click the blue chat button in the lower-right corner of the page. Our dedicated support resources will answer any questions you have there.

from appcenter-docs.

michael-hawker avatar michael-hawker commented on May 24, 2024

@dparvin can we get that code added to the docs? I had found some other code elsewhere that was incorrect for some scenarios.

Ah, right, I was reading somewhere that CurrentRegion may always return US? https://stackoverflow.com/questions/44312188/how-to-get-users-region-on-windows-10-uwp

from appcenter-docs.

michael-hawker avatar michael-hawker commented on May 24, 2024

Tested on my VM, CurrentRegion returns US still when I change the Country/region in Settings. new Windows.Globalization.GeographicRegion().CodeTwoLetter returns the proper result that I set in Region Settings.

from appcenter-docs.

michael-hawker avatar michael-hawker commented on May 24, 2024

@jwargo good point, will do :) Buddy of mine pointed me to this commit in your samples which uses what I suggested as well:
microsoft/appcenter-sdk-dotnet@46efe1f

from appcenter-docs.

iamclement avatar iamclement commented on May 24, 2024

Hi there, the concern is legit but same comment then in the PR.
Windows.Globalization.GeographicRegion().CodeTwoLetter doesn't exactly fit the SDK use case. The SDK reports this country code as carrier country code which means it's not supposed to be provided by the user. There was a discussion around this in the App Center DotNet GH repository. We would need a sample using the location service I guess. I'll create a work item on our side to update the documentation with a location service sample but not sure when this will be picked up.

from appcenter-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.