Interface LocationUtils


@NotNullByDefault public interface LocationUtils
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Returns the name of the country for display in the UI or the isoCode if none could be found.
    Get the country the device is currently located in, or "" if it cannot be determined.
  • Method Details

    • getCurrentCountry

      String getCurrentCountry()
      Get the country the device is currently located in, or "" if it cannot be determined.

      The country codes are formatted upper-case and as per ISO 3166-1 alpha 2.

    • getCountryDisplayName

      static String getCountryDisplayName(String isoCode)
      Returns the name of the country for display in the UI or the isoCode if none could be found.
      Parameters:
      isoCode - The result from getCurrentCountry().