The Adjust SDK contains helper methods that return device information. Use these methods to add details to your callbacks and improve your reporting.
Adjust device identifier
public static void GetAdid(Action<string> callback)Adjust generates a unique Adjust Device ID (ADID) for each device. You can return the device’s ADID by calling the Adjust.GetAdid method with a callback function. The SDK fetches the information asynchronously and passes it to your callback function.
Adjust.GetAdid(adid =>{ // Your callback function});Adjust device identifier with timeout
public static void GetAdidWithTimeout(long timeout, Action<string?> callback)You can also request ADID value asynchronously by calling Adjust.GetAdidWithTimeout, providing both a callback function and a timeout (in milliseconds).
If the SDK retrieves the ADID within the specified timeout, it supplies the value to your callback as a string. Otherwise, it passes null.
Adjust.GetAdidWithTimeout(5000, adid =>{ // Your callback function});ID For Advertisers
public static void GetIdfa(Action<string> callback)The ID for Advertisers (IDFA) is a device-specific identifier for Apple devices. You can return the device’s IDFA by calling the Adjust.GetIdfa method with a callback function. The SDK fetches the information asynchronously and passes it to your callback function.
Adjust.GetIdfa(idfa =>{ // Your callback function});ID For Vendor
public static void GetIdfv(Action<string> callback)The ID for Vendor (IDFV) is a device-specific identifier for Apple devices. You can return the device’s IDFV by calling the Adjust.GetIdfv method with a callback function. The SDK fetches the information asynchronously and passes it to your callback function.
Adjust.GetIdfv(idfv =>{ // Your callback function});Google Play Services Advertising ID
public static void GetGoogleAdId(Action<string> OnDeviceIdsRead)The Google Play Services Advertising ID (GPS ADID) is a device-specific identifier for Android devices.
Users can opt out of sharing their GPS ADID by toggling the “Opt out of Ads Personalization” setting on their device. When a user enables this setting, the Adjust SDK returns a string of zeros when trying to read the GPS ADID.
You can access this value by calling the GetGoogleAdId method in a background thread. Assign a delegate function to access the GPS ADID value.
Adjust.GetGoogleAdId(googleAdId =>{ // Your callback function});Amazon Advertiser ID
public static void GetAmazonAdId(Action<string?> onAmazonAdIdRead)The Amazon Advertising ID (Amazon Ad ID) is a device-specific identifier for Android devices. Call the GetAmazonAdId method with a callback function. The SDK fetches the information asynchronously and passes it to your callback function. If the Amazon Ad ID is unavailable, the SDK passes null.
Adjust.GetAmazonAdId(amazonAdId =>{ // Your callback function});Get last deeplink
public static void GetLastDeeplink(Action<string?> callback)You can retrieve the last deeplink that was processed by the Adjust SDK. This is useful if you need to access deeplink information that was received when the app was opened from a link.
Call the Adjust.GetLastDeeplink method with a callback function. The SDK fetches the information asynchronously and passes it to your callback function as a nullable string. If no deeplink has been processed, the callback receives null.
Adjust.GetLastDeeplink(deeplink =>{ if (deeplink != null) { // Use the deeplink } else { // No deeplink available }});