The Adobe AIR SDK contains helper methods that return device information. Use these methods to add details to your callbacks and improve your reporting.
Adjust device identifier
Adjust generates a unique Adjust Device ID (ADID) for each device. The ADID is available after Adjust registered an app install, which means you can only access this value after the SDK has been initialised and your app was installed and recorded successfully.
To access this ID, call the getAdid
method. The SDK fetches the information asynchronously and passes it to your function.
- Call the
getAdid
method on yourAdjust
instance. - Return the
adid
as aString
.
getAdid
:getAdid
A function that obtains a device ADID.
adid
:String
The device ADID.
Adjust.getAdid(function (adid:String):void { trace("Adjust ID = " + adid);});
Amazon Advertising ID (Android-only)
The Amazon Advertising ID (Amazon Ad ID) is a device-specific identifier for Android devices. To access this ID, call the getAmazonAdId
method. The SDK fetches the information asynchronously and passes it to your function.
- Call the
getAmazonAdId
method on yourAdjust
instance. - Return the
amazonAdId
as aString
.
getAmazonAdId
:getAmazonAdId
A function that obtains a device Amazon Ad ID.
amazonAdId
:String
The device Amazon Ad ID.
Adjust.getAmazonAdId(function (amazonAdId:String):void { trace("Amazon Advertising ID = " + amazonAdId);});
Apple's Identifier for Advertisers (IDFA)
The ID for Advertisers (IDFA) is a device-specific identifier for Apple devices. To access this ID, call the getIdfa
method. The SDK fetches the information asynchronously and passes it to your function.
- Call the
getIdfa
method on yourAdjust
instance. - Return the
idfa
as aString
.
getIdfa
:getIdfa
A function that obtains a device IDFA.
idfa
:String
The device IDFA.
Adjust.getIdfa(function (idfa:String):void { trace("IDFA = " + idfa);});
Google Play Services Advertising ID
The Google Play Services Advertising ID (GPS ADID) is an Android device-specific identifier.
Users can opt out of sharing their GPS ADID by toggling the “Opt out of Ads Personalization” setting on their device. When a user opts out, Adjust returns a string of zeros when trying to read the GPS ADID.
To access this ID, call the getGoogleAdId
method in a background thread. Assign a delegate function to access the GPS ADID value.
- Call the
getGoogleAdId
method on yourAdjust
instance. - Pass it the
getGoogleAdIdCallback
function. - Return the
googleAdId
as aString
parameter.
The getGoogleAdId
function requires the following arguments:
getGoogleAdId
:getGoogleAdIdCallback
A function that obtains a device GPS ADID.
googleAdId
:String
The device GPS ADID.
Adjust.getGoogleAdId(getGoogleAdIdCallback);
// …
private static function getGoogleAdIdCallback(googleAdId:String):void { trace("Google Ad Id = " + googleAdId);}