SdkSandboxManager.AddSyncedSharedPreferencesKeys 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.
Adds keys to set of keys being synced from app's default SharedPreferences to the SDK sandbox.
[Android.Runtime.Register("addSyncedSharedPreferencesKeys", "(Ljava/util/Set;)V", "", ApiSince=34)]
public void AddSyncedSharedPreferencesKeys(System.Collections.Generic.ICollection<string> keys);
[<Android.Runtime.Register("addSyncedSharedPreferencesKeys", "(Ljava/util/Set;)V", "", ApiSince=34)>]
member this.AddSyncedSharedPreferencesKeys : System.Collections.Generic.ICollection<string> -> unit
Parameters
- keys
- ICollection<String>
set of keys that will be synced to Sandbox. This value cannot be null.
- Attributes
Remarks
Adds keys to set of keys being synced from app's default SharedPreferences to the SDK sandbox.
Synced data will be available for SDKs to read using the ClientSharedPreferences property.
To stop syncing any key that has been added using this API, use RemoveSyncedSharedPreferencesKeys(ICollection<String>).
The sync breaks if the app restarts and user must call this API again to rebuild the pool of keys for syncing.
Note: This class does not support use across multiple processes.
Android reference for android.app.sdksandbox.SdkSandboxManager.addSyncedSharedPreferencesKeys.
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.