The Open Anonymous Device Identifier (OAID) is a unique identifier for Android devices. The Mobile Security Alliance (MSA) recommends all Chinese-manufactured devices provide an OAID. You can use the OAID to attribute and measure devices where Google Play Services isn’t available.
The OAID plugin provides the OAID of a device. The SDK will continue to use other identifiers as well as the OAID.
Add the plugin to your app
Install NuGet package
Add the following package reference to your project file:
<PackageReference Include="Adjust.Maui.Sdk.Oaid" Version="5.5.0" />Add as a project reference
If you prefer to add the OAID plugin as a project reference instead of using the NuGet package, you can add the path to the plugin project:
<ProjectReference Include="..\maui_sdk\plugins\AdjustOaid\AdjustOaid.csproj" />Use the plugin
Once you have set up the plugin, you can gather the device’s OAID. To do this, call the AdjustOaid.readOaid method before initializing the Adjust SDK.
using AdjustOaid;
// Call before initializing the Adjust SDKAdjustOaid.readOaid();
// Initialize the Adjust SDKAdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox);Adjust.InitSdk(adjustConfig);To stop the SDK from reading OAID values, call the AdjustOaid.DoNotReadOaid method before initializing the Adjust SDK.
using AdjustOaid;
// Call before initializing the Adjust SDKAdjustOaid.DoNotReadOaid();
// Initialize the Adjust SDKAdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox);Adjust.InitSdk(adjustConfig);