LocaleManager.GetApplicationLocales(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the current UI locales for a specified app (described by package name).
[Android.Runtime.Register("getApplicationLocales", "(Ljava/lang/String;)Landroid/os/LocaleList;", "GetGetApplicationLocales_Ljava_lang_String_Handler", ApiSince=33)]
[Android.Runtime.RequiresPermission("android.permission.READ_APP_SPECIFIC_LOCALES")]
public virtual Android.OS.LocaleList GetApplicationLocales(string appPackageName);
[<Android.Runtime.Register("getApplicationLocales", "(Ljava/lang/String;)Landroid/os/LocaleList;", "GetGetApplicationLocales_Ljava_lang_String_Handler", ApiSince=33)>]
[<Android.Runtime.RequiresPermission("android.permission.READ_APP_SPECIFIC_LOCALES")>]
abstract member GetApplicationLocales : string -> Android.OS.LocaleList
override this.GetApplicationLocales : string -> Android.OS.LocaleList
Parameters
- appPackageName
- String
the package name of the app for which to retrieve the locales.
Returns
The Android.OS.LocaleList returned by this API.
- Attributes
Remarks
Returns the current UI locales for a specified app (described by package name). Returns EmptyLocaleList if no app-specific locales are set. This API can be used by an app's installer (see InstallingPackageName) to retrieve the app's locales. The current input method can use this API to retrieve locales of another package. All other cases require the android.permission.READ_APP_SPECIFIC_LOCALES permission. Apps should generally retrieve their own locales via their in-process LocaleLists, or via ApplicationLocales.
Android reference for android.app.LocaleManager.getApplicationLocales.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.