Stay organized with collections
Save and categorize content based on your preferences.
GoogleMobileAds.Api.ApplicationPreferences
Interface for accessing and modifying application preference data (SharedPreferences on Android and NSUserDefaults on iOS).
Summary
Values saved by this interface are saved in an application scope, and are shared by SDKs included in this application.
Public static functions
|
GetInt(string key)
|
int
Read an int value from the application preferences.
|
GetString(string key)
|
string
Read a string value from the application preferences.
|
SetInt(string key, int value)
|
void
Set an int value in the application preferences.
|
SetString(string key, string value)
|
void
Set a string value in the application preferences.
|
Public static functions
GetInt
int GetInt(
string key
)
Read an int value from the application preferences.
Details |
Parameters |
key
|
The key with which to retrieve the value.
|
|
GetString
string GetString(
string key
)
Read a string value from the application preferences.
Details |
Parameters |
key
|
The key with which to retrieve the value.
|
|
SetInt
void SetInt(
string key,
int value
)
Set an int value in the application preferences.
Details |
Parameters |
key
|
The key with which to associate the value.
|
value
|
The value that needs to be associated to the key.
|
|
SetString
void SetString(
string key,
string value
)
Set a string value in the application preferences.
Details |
Parameters |
key
|
The key with which to associate the value.
|
value
|
The value that needs to be associated to the key.
|
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-18 UTC."],[[["The `ApplicationPreferences` interface allows access and modification of application preference data, similar to SharedPreferences on Android and NSUserDefaults on iOS."],["Values stored using this interface are application-wide and shared by all SDKs within the application."],["It provides functions to get and set integer and string values using keys."],["`GetInt` and `GetString` retrieve integer and string values respectively using a specified key."],["`SetInt` and `SetString` store integer and string values respectively, associating them with a given key."]]],["This interface allows access to application preference data, shared across all SDKs within the application. It provides four functions: `GetInt` and `GetString` to read integer and string values, respectively, using a specified key. `SetInt` and `SetString` are used to store integer and string values, associating them with a given key. The data is stored with application scope.\n"]]