Stay organized with collections
Save and categorize content based on your preferences.
GoogleMobileAds.Api.ApplicationPreferences
Interface for accessing and modifying platform preference data (SharedPreferences on Android and NSUserDefaults on iOS).
Summary
Values saved by this interface are saved on an application scope, and are shared by SDKs included in this application.
Public static functions
|
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
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 2023-09-07 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 2023-09-07 UTC."],[[["`GoogleMobileAds.Api.ApplicationPreferences` provides an interface for managing platform-specific preference data."],["This interface allows setting integer and string values, which are shared across SDKs within the application."],["Preference data is stored using `SharedPreferences` on Android and `NSUserDefaults` on iOS, ensuring application-wide accessibility."],["Values are saved with a specific key for later retrieval or modification."]]],[]]