diff --git a/src/content/docs/en/sdk/adobe-air/example-app.mdoc b/src/content/docs/en/sdk/adobe-air/example-app.mdoc new file mode 100644 index 000000000..fd46bd247 --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/example-app.mdoc @@ -0,0 +1,14 @@ +--- +title: Adobe AIR example implementation +description: A full example of an app that uses all the features available in the Adjust Adobe AIR SDK. +sidebar-label: Example app +sidebar-position: 12 +--- + +This page contains a full example implementation of the Adjust Adobe AIR SDK for Android. + +You can access [the full example on GitHub](https://github.com/adjust/adobe_air_sdk/blob/master/example/Main.as). + +https://github.com/adjust/adobe_air_sdk/blob/master/example/Main-app.xml + +> TODO: Add using the Astro component diff --git a/src/content/docs/en/sdk/adobe-air/features/att-wrapper.mdoc b/src/content/docs/en/sdk/adobe-air/features/att-wrapper.mdoc new file mode 100644 index 000000000..7880f8c68 --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/att-wrapper.mdoc @@ -0,0 +1,84 @@ +--- +title: Set up App Tracking Transparency +description: Configure your iOS app to use Apple's App Tracking Transparency framework. +sidebar-position: 2 +--- + +If you want to record an iOS device's ID for Advertisers (IDFA), you must display a prompt to get your user's consent. + +To do this, you need to include Apple's App Tracking Transparency (ATT) framework in your app. The SDK stores the user's authorization status and sends it to Adjust's servers with each request. + +## Authorization statuses {% #authorization-statuses %} + +0: `ATTrackingManagerAuthorizationStatusNotDetermined` +The user hasn’t responded to the access prompt yet. + +1: `ATTrackingManagerAuthorizationStatusRestricted` +Access to app-related data is blocked at the device level. + +2: `ATTrackingManagerAuthorizationStatusDenied` +The user has denied access to app-related data for device measurement. + +3: `ATTrackingManagerAuthorizationStatusAuthorized` +The user has granted access to app-related data for device measurement. + +## ATT authorization wrapper {% #att-wrapper %} + +The Adobe AIR SDK contains a wrapper around [Apple’s `requestTrackingAuthorizationWithCompletionHandler` method](https://developer.apple.com/documentation/AppTrackingTransparency/ATTrackingManager/requestTrackingAuthorization\(completionHandler:\)). You can use this wrapper to customize the ATT prompt. + +The callback method triggers when your user responds to the consent dialog. This method sends the user’s consent status code to Adjust’s servers. You can define responses to each status code within the callback function. + +You must specify text content for the ATT request dialog. To do this, add your text to the `NSUserTrackingUsageDescription` key in your `Info.plist` file. + +1. Call the `requestAppTrackingAuthorization` method. +1. Pass the status as a `String`. + +The `requestAppTrackingAuthorization` method requires the following argument: + +{% deflist %} +`requestAppTrackingAuthorization`: `requestAppTrackingAuthorization` + +: A function that requests the user's consent. + +`status`: `String` + +: The user's authorization status. +{% /deflist %} + +```actionscript-3 +Adjust.requestAppTrackingAuthorization(function (status:String):void { + trace("Status = " + status); +}); +``` + +```actionscript-3 +import com.adjust.sdk.Adjust; +import com.adjust.sdk.AdjustConfig; +import com.adjust.sdk.AdjustEnvironment; +import com.adjust.sdk.AdjustLogLevel; + +public class Example extends Sprite { + public function Example() { + var appToken:String = "{YourAppToken}"; + var environment:String = AdjustEnvironment.SANDBOX; + + var adjustConfig:AdjustConfig = new AdjustConfig(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel.VERBOSE); + adjustConfig.setAttributionCallback(attributionCallback); + + Adjust.initSdk(adjustConfig); + + Adjust.requestAppTrackingAuthorization(authorizationStatus); + } + + // ... + + private static function authorizationStatus(status:String):void { + trace("Status = " + status); + } +} +``` + +> Anything else relevant? See [Flutter](https://dev.adjust.com/en/sdk/flutter/features/att) **AND** [iOS](https://dev.adjust.com/en/sdk/ios/features/att) + +## Tutorial {% #tutorial %} diff --git a/src/content/docs/en/sdk/adobe-air/features/attribution.mdoc b/src/content/docs/en/sdk/adobe-air/features/attribution.mdoc new file mode 100644 index 000000000..6ed9538e9 --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/attribution.mdoc @@ -0,0 +1,140 @@ +--- +title: Manage attribution callbacks +description: Set up a callback function to listen for attribution changes. +sidebar-position: 2 +--- + +When Adjust receives install data from the SDK, the device is attributed to the source of the install. This attribution information can change if the user is retargeted or interacts with another campaign. + +You can configure a callback function to respond to attribution changes. When Adjust receives new attribution information, it sends the data asynchronously back to the device. The callback function receives the device's attribution data as an argument. + +Read Adjust's [attribution data policies](https://github.com/adjust/sdks/blob/master/doc/attribution-data.md) to learn more about attribution data. + +## Trigger a function when attribution changes {% #trigger-a-function-when-attribution-changes %} + +The SDK can listen for attribution changes and call a function when it detects an update. To configure your callback function, assign it to the `attributionCallback` property of your `adjustConfig` instance. + +{% callout type="note" %} +**Note**: You must call the `attributionCallback` method **before** you initialize the Adjust SDK in your app. +{% /callout %} + +Follow these steps to implement the optional callback in your application: + +1. Create a `void` method that receives an `AdjustAttribution` parameter type. +1. Create an `AdjustConfig` instance. +1. Call the `adjustConfig.setAttributionCallback` with the method you created. + +Within the callback function you have access to the `attribution` parameter. + +### Reference {% #reference %} + +The callback function requires the following argument: + +{% deflist %} +`setAttributionCallback`: `attributionCallback` + +: A function that receives device attribution information asynchronously. +{% /deflist %} + +The `attribution` parameter supports the following properties: + +{% deflist %} +`trackerToken`: `String` + +: The token of the link to which the device is currently attributed. + +`trackerName`: `String` + +: The name of the link to which the device is currently attributed. + +`network`: `String` + +: The name of the network to which the device is currently attributed. + +`campaign`: `String` + +: The name of the campaign to which the device is currently attributed. + +`adgroup`: `String` + +: The name of the adgroup to which the device is currently attributed. + +`creative`: `String` + +: The name of the creative to which the device is currently attributed. + +`clickLabel`: `String` + +: The [click label](https://help.adjust.com/en/article/user-rewards) that the install is tagged with. + +`costType`: `String` + +: The campaign pricing model (for example, CPI). + +`costAmount`: `Number` + +: The cost of the install. + +`costCurrency`: `String` + +: The [3 character ISO 4217 code](https://www.iban.com/currency-codes) of the currency associated with the cost. + +`fbInstallReferrer`: `String` + +: The [Facebook install referrer](https://developers.facebook.com/docs/app-ads/install-referrer/) of the current attribution. +{% /deflist %} + +### Attribution callback snippet + +```actionscript-3 +import com.adjust.sdk.Adjust; +import com.adjust.sdk.AdjustConfig; +import com.adjust.sdk.AdjustEnvironment; +import com.adjust.sdk.AdjustLogLevel; +import com.adjust.sdk.AdjustAttribution; + +public class Example extends Sprite { + public function Example() { + var appToken:String = "{YourAppToken}"; + var environment:String = AdjustEnvironment.SANDBOX; + + var adjustConfig:AdjustConfig = new AdjustConfig(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel.VERBOSE); + adjustConfig.setAttributionCallback(attributionCallback); + + Adjust.initSdk(adjustConfig); + } + + // … + + private static function attributionCallback(attribution:AdjustAttribution):void { + trace("Tracker token = " + attribution.getTrackerToken()); + trace("Tracker name = " + attribution.getTrackerName()); + trace("Campaign = " + attribution.getCampaign()); + trace("Network = " + attribution.getNetwork()); + trace("Creative = " + attribution.getCreative()); + trace("Adgroup = " + attribution.getAdgroup()); + trace("Click label = " + attribution.getClickLabel()); + trace("Cost type = " + attribution.getCostType()); + trace("Cost amount = " + isNaN(attribution.getCostAmount()) ? "NaN" : attribution.getCostAmount().toString()); + trace("Cost currency = " + attribution.getCostCurrency()); + trace("FB install referrer = " + attribution.getFbInstallReferrer()); + } +} +``` + +## Get current attribution information {% #get-current-attribution-information %} + +When a user installs your app, Adjust attributes the install to a campaign. The Adjust SDK gives you access to campaign attribution details for your install. To return this information, call the `getAttribution` method . + +{% codeblock title="Attribution getter" %} +```actionscript-3 + +Adjust.getAttribution(function (attribution:AdjustAttribution):void { +// process attribution +}); + +``` +{% /codeblock %} + +## Tutorial {% #tutorial %} diff --git a/src/content/docs/en/sdk/adobe-air/features/deep-links.mdoc b/src/content/docs/en/sdk/adobe-air/features/deep-links.mdoc new file mode 100644 index 000000000..b84027d8c --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/deep-links.mdoc @@ -0,0 +1,241 @@ +--- +title: Set up deep links +description: Configure your app to handle direct and deferred deep links. +sidebar-position: 6 +--- + +[Deep links](https://help.adjust.com/en/article/deep-links) are URIs (Uniform Resource Identifiers) that direct users to specific pages within your app. They improve the user experience by guiding them directly to relevant content after they interact with a link. + +Adobe AIR SDK supports two types of deep links, based on whether the user has already installed your app: + +- **Direct deep links**: If the user already has your app installed, the link opens the specified page. +- **Deferred deep links**: If the user doesn’t have your app installed, the link directs them to the app store to install it. After installation, the app opens in the specified page. + +## Configure your app {% #configure-deep-link-android %} + +{% tabs %} +{% tab title="Android" sync="android" %} +To enable your Android app to support deep link, add the following `` to the activity you want to launch after deep linking. Replace `adjust-example` with your scheme name: + +```xml + + + + + + + + + + + + + + +``` +{% /tab %} + +{% tab title="iOS" sync="ios" %} +To enable your iOS app to support deep link, add the following into the `` section of the app descriptor's `` section. +Replace `adjust-example` with your scheme name: + +```xml + + + CFBundleURLTypes + + + CFBundleURLName + com.your.bundle + CFBundleURLSchemes + + adjust-example + + + + ]]> + + +``` + +> https://dev.adjust.com/en/sdk/ios/features/deep-links +**Important**: By using this approach for deep linking support in iOS, you will support deep link handling for devices running on **iOS 8 and lower**. Starting from **iOS 9**, Apple has introduced universal links for which, at this moment, there's no built in support inside the Adobe AIR platform. To support this, you would need to edit the natively generated iOS project in Xcode (if possible) and add support to handle universal links from there. If you are interested in finding out how to do that on the native side, please consult the [native iOS universal links guide][universal-links-guide]. +{% /tab %} +{% /tabs %} + +## Reattribution with direct deep links {% #reattribution-with-deep-links %} + +You can reattribute your users by sending deep link information to Adjust. When a user interacts with the deep link, the SDK sends this data to Adjust to update their attribution information. + +1. First, create a new `AdjustDeeplink` instance with your deep link URI. The `AdjustDeeplink` class validates this URI and checks the formatted string to ensure successful processing. + +1. Then, call the `Adjust.processDeeplink` method to handle the deep link and pass the information to Adjust. + +The `AdjustDeeplink` class constructor requires the following argument: + + + +{% deflist %} +`deeplink`: `Uri` + +: The deep link URI that opens your app. +{% /deflist %} + +The `Adjust.processDeeplink` method requires the following argument: + +{% deflist %} +`adjustDeeplink`: `AdjustDeeplink` + +: The `AdjustDeeplink` instance you created. +{% /deflist %} + +To get information via a direct deep link, subscribe to the `InvokeEvent.INVOKE` event and set up a callback method that's triggered once this event happens. You can access the URL of the deep link that opened your app inside that callback method: + +```actionscript-3 +var app:NativeApplication = NativeApplication.nativeApplication; +app.addEventListener(InvokeEvent.INVOKE, onInvoke); + +// ... + +private static function onInvoke(event:InvokeEvent):void { + if (event.arguments.length == 0) { + return; + } + + var deeplink:String = event.arguments[0]; + trace("Deeplink = " + deeplink); + var adjustDeeplink:AdjustDeeplink = new AdjustDeeplink(deeplink); + Adjust.processDeeplink(adjustDeeplink); +} +``` + +## Deferred deep link callbacks {% #deffered-deep-link-callbacks %} + +To get information via a deferred deep link, you set a callback method on the `AdjustConfig` instance. This receives a `String` parameter where the content of the URL will be delivered. + +1. Call `setDeferredDeeplinkCallback` method on your `adjustConfig` instance. +1. Pass the deep link as a `String`. + +The `setDeferredDeeplinkCallback` method requires the following arguments: + + + +{% deflist %} +`setDeferredDeeplinkCallback`: `setDeferredDeeplinkCallback` + +: A function that sets a deferred deep link callback. + +`deeplink`: `String` + +: The deferred deep link you want to pass. +{% /deflist %} + +```actionscript-3 +var appToken:String = "{YourAppToken}"; +var environment:String = AdjustEnvironment.SANDBOX; + +var adjustConfig:AdjustConfig = new AdjustConfig(appToken, environment); +adjustConfig.setDeferredDeeplinkCallback(DeferredDeeplinkCallback); +Adjust.initSdk(adjustConfig); + +// ... + +private static function DeferredDeeplinkCallback(deeplink:String):void { + trace("Received deferred deep link"); + trace("Deep link = " + deeplink); +}; +``` + +## Disable opening deferred deep links {% #launch-deferred-deep-links %} + +The SDK opens deferred deep links by default. You can disable this behavior with the `disableDeferredDeeplinkOpening` method. + +1. Call `disableDeferredDeeplinkOpening` on your `adjustConfig` instance. + +```actionscript-3 +adjustConfig.disableDeferredDeeplinkOpening(); +``` + +> **Adapat and add snippets** +**See template: [Adobe Extension tutorial](https://dev-docs-hcfx9x6by-product-content.vercel.app/en/sdk/adobe-extension/android/deep-linking#tutorial)** + +## Tutorial: Create a deferred deep link function {% #tutorial %} + +If you followed the [integration guide](/en/sdk/adobe-air/features/integration), you've already configured the Adjust AIR SDK to process and open deep links. If you haven't done this, refer to [set up deep link handling](/en/sdk/adobe-air/features/integration#set-up-deep-link-handling) for instructions. + +In this tutorial, you'll learn how to create a callback function that controls deep linking functionality using the `setDeferredDeeplinkCallback` method. The function will open the link depending on the following condition: + +"If the deep link contains `"no_open"`, the app won't open it." + +The result looks like this: + +```actionscript-3 +package { + import com.adjust.sdk.Adjust; + import com.adjust.sdk.AdjustConfig; + import com.adjust.sdk.AdjustEnvironment; + import com.adjust.sdk.AdjustLogLevel; + + public class Example extends Sprite { + public function Example() { + var appToken:String = "{YourAppToken}"; + var environment:String = AdjustEnvironment.SANDBOX; + + var adjustConfig:AdjustConfig = new AdjustConfig(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel.VERBOSE); + + adjustConfig.setDeferredDeeplinkCallback(DeferredDeeplinkCallback); + + Adjust.initSdk(adjustConfig); + } + } + + private static function deferredDeeplinkDelegate(uri:String):void { + trace("Received deferred deeplink"); + trace("URI = " + uri); + } + +} + +``` + +Here's what you need to do: + +1. Inside the `try...catch` block, call the `setDeferredDeeplinkCallback` method of your `adjustConfig` instance. Pass an `OnDeferredDeeplinkResponseListener` instance as an argument. + + {% codeblock title="Main.as" highlight="{range: 6}" %} + ```actionscript-3 + // add snippet + + ``` + {% /codeblock %} + +1. Create a new public function called `launchReceivedDeeplink` inside your `OnDeferredDeeplinkResponseListener` declaration. This method takes a `Uri` argument and returns a `boolean`. + + {% codeblock title="Main.as" highlight="{range: 3}" %} + ```actionscript-3 + // add snippet + + ``` + {% /codeblock %} + +1. Add an `if` condition to the `launchReceivedDeeplink` to check if the `deeplink` contains the value `"no_open"`. If the string is found, the function returns `false`, and the app shouldn't open the deferred deep link. + + {% codeblock title="Main.as" highlight="{range: 3-5}" %} + ```actionscript-3 + // add snippet + + ``` + {% /codeblock %} + +1. Finally, add an `else` block to return `true` if the deep link doesn't contain `"no_open"`. + + {% codeblock title="Main.as" highlight="{range: 5-7}" %} + ```actionscript-3 + // add snippet + + ``` + {% /codeblock %} + +That's it! When a user opens your app with a deferred deep link, the Adobe AIR SDK will check if the link contains the string `"no_open"`. If it does, the app won't open the deep link. diff --git a/src/content/docs/en/sdk/adobe-air/features/device-information.mdoc b/src/content/docs/en/sdk/adobe-air/features/device-information.mdoc new file mode 100644 index 000000000..09004089b --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/device-information.mdoc @@ -0,0 +1,122 @@ +--- +title: Get device information +description: Use these methods to add details to your callbacks and improve your reporting. +sidebar-position: 10 +--- + +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-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. + +1. Call the `getAdid` method on your `Adjust` instance. +1. Return the `adid` as a `String`. + +{% deflist %} +`getAdid`: `getAdid` + +: A function that obtains a device ADID. + +`adid`: `String` + +: The device ADID. +{% /deflist %} + +{% codeblock title="Adjust ID getter" %} +```actionscript-3 +Adjust.getAdid(function (adid:String):void { + trace("Adjust ID = " + adid); +}); +``` +{% /codeblock %} + +## Amazon Advertising ID (Android-only) {% #amazon-advertiser-id %} + +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. + +1. Call the `getAmazonAdId` method on your `Adjust` instance. +1. Return the `amazonAdId` as a `String`. + +{% deflist %} +`getAmazonAdId`: `getAmazonAdId` + +: A function that obtains a device Amazon Ad ID. + +`amazonAdId`: `String` + +: The device Amazon Ad ID. +{% /deflist %} + +{% codeblock title="Amazon ADID getter" %} +```actionscript-3 +Adjust.getAmazonAdId(function (amazonAdId:String):void { + trace("Amazon Advertising ID = " + amazonAdId); +}); +``` +{% /codeblock %} + +## Apple's Identifier for Advertisers (IDFA) {% #id-for-advertisers %} + +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. + +1. Call the `getIdfa` method on your `Adjust` instance. +1. Return the `idfa` as a `String`. + +{% deflist %} +`getIdfa`: `getIdfa` + +: A function that obtains a device IDFA. + +`idfa`: `String` + +: The device IDFA. +{% /deflist %} + +{% codeblock title="IDFA getter" %} +```actionscript-3 +Adjust.getIdfa(function (idfa:String):void { + trace("IDFA = " + idfa); +}); +``` +{% /codeblock %} + +## Google Play Services Advertising ID {% #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. + +1. Call the `getGoogleAdId` method on your `Adjust` instance. +1. Pass it the `getGoogleAdIdCallback` function. +1. Return the `googleAdId` as a `String` parameter. + +The `getGoogleAdId` function requires the following arguments: + +{% deflist %} +`getGoogleAdId`: `getGoogleAdIdCallback` + +: A function that obtains a device GPS ADID. + +`googleAdId`: `String` + +: The device GPS ADID. +{% /deflist %} + +{% codeblock title="GPS ADID getter" %} +```actionscript-3 +Adjust.getGoogleAdId(getGoogleAdIdCallback); + +// … + +private static function getGoogleAdIdCallback(googleAdId:String):void { + trace("Google Ad Id = " + googleAdId); +} +``` +{% /codeblock %} + +## Tutorial {% #tutorial %} diff --git a/src/content/docs/en/sdk/adobe-air/features/events.mdoc b/src/content/docs/en/sdk/adobe-air/features/events.mdoc new file mode 100644 index 000000000..e067c1920 --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/events.mdoc @@ -0,0 +1,123 @@ +--- +title: Send event information +description: Configure the SDK to send event information to Adjust's servers. +sidebar-position: 5 +--- + +You can configure the SDK to send event information to Adjust's servers when your users take specific actions. Adjust records these events and displays them in your [Datascape reports](https://help.adjust.com/en/article/datascape), [server callbacks](https://help.adjust.com/en/article/server-callbacks), and [cloud storage uploads](https://help.adjust.com/en/article/cloud-storage-uploads). + +To learn how to configure events in Adjust, visit the [Add events guide](https://help.adjust.com/en/article/add-events). + +## Send an event {% #send-event %} + +The Adjust SDK provides an `AdjustEvent` object which you can use to structure and send event information from your app to Adjust’s servers. + +### Reference {% #send-event-reference %} + +To send event information with the Adjust SDK, you need to instantiate an `AdjustEvent` object. This object contains variables that are sent to Adjust when an event occurs in your app. + +1. Create an [event token in the Adjust dashboard](https://help.adjust.com/en/article/add-events#add-event), and copy it. +1. Create a new `AdjustEvent` instance in your button’s click handler method. +1. Pass the following parameters: + +{% deflist %} +`eventToken`: `String` + +: Your Adjust event token. +{% /deflist %} + +```actionscript-3 + import com.adjust.sdk.AdjustEvent; + private static function TrackEventClick(Event:MouseEvent):void { + trace ("Track simple event button tapped!"); + + var adjustEvent:AdjustEvent = new AdjustEvent("abc123"); + + Adjust.trackEvent(adjustEvent); + } +``` + +## Record event revenue {% #record-event-revenue %} + +You can record revenue associated with an event by setting the revenue and currency properties on your event instance. Use this feature to record revenue-generating actions in your app. + +### Reference {% #record-event-revenue-reference %} + +To set these properties, call the `setRevenue` method and pass the following arguments: + +{% deflist %} +`revenue`: `Number` + +: The amount of revenue generated by the event. + +`currency`: `String` + +: The [ISO 4217 code](https://www.iban.com/currency-codes) of the event currency. +{% /deflist %} + +```actionscript-3 + import com.adjust.sdk.AdjustEvent; + + private static function TrackRevenueClick(Event:MouseEvent):void { + trace ("Track revenue event button tapped!"); + + var adjustEvent:AdjustEvent = new AdjustEvent("abc123"); + adjustEvent.setRevenue(0.01, "EUR"); + + Adjust.trackEvent(adjustEvent); + } +``` + +When you set a currency token, Adjust automatically converts the incoming revenue into the reporting revenue of your choice. Read more about [currency conversion](https://help.adjust.com/en/article/currency-conversion) and the list of [supported currencies](https://help.adjust.com/en/article/supported-currencies). + +## Deduplicate revenue events {% #deduplicate-revenue-events %} + +You can pass an optional identifier to avoid recording duplicate events. By default, the SDK stores the last 10 identifiers and skips revenue events with duplicate IDs. + +> IS THIS CORRECT? +If you would like the SDK to store more than 10 identifiers, set the desired number of identifiers by assigning the value to `eventDeduplicationIdsMaxSize` of the `AdjustConfig` instance. + +### Reference {% #deduplicate-revenue-events-reference %} + +To set the identifier, assign your deduplcation ID to the `deduplicationId` property of your event instance. + +The `setDeduplicationId` method requires the following argument: + +{% deflist %} +`id`: `String` + +: The revenue event identifier. +{% /deflist %} + +```actionscript-3 +adjustConfig.eventDeduplicationIdsMaxSize = 20; +Adjust.initSdk(adjustConfig); + +// ... + +var adjustEvent:AdjustEvent = new AdjustEvent("abc123"); +adjustEvent.setDeduplicationId("deduplicationId"); +Adjust.trackEvent(adjustEvent); +``` + +## Callback identifier {% #callback-identifier %} + +You can add a custom string identifier to each event you want to monitor. Access this identifier in your [event callbacks](/en/sdk/adobe-air/features/session-event-callbacks#event-callbacks) to keep track of which event was successfully recorded. + +### Reference {% #callback-identifier-reference %} + +To set this identifier, call the `setCallbackId` method on your `AdjustEvent` instance. + +The `setCallbackId` method requires the following argument: + +{% deflist %} +`id`: `String` + +: The custom string identifier. +{% /deflist %} + +```actionscript-3 +var adjustEvent:AdjustEvent = new AdjustEvent("abc123"); +adjustEvent.setCallbackId("Your-Custom-Id"); +Adjust.trackEvent(adjustEvent); +``` diff --git a/src/content/docs/en/sdk/adobe-air/features/external-device-id.mdoc b/src/content/docs/en/sdk/adobe-air/features/external-device-id.mdoc new file mode 100644 index 000000000..ac20a0540 --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/external-device-id.mdoc @@ -0,0 +1,46 @@ +--- +title: Configure external device ID +description: Configure an external device ID for reporting. +sidebar-position: 4 +--- + +An [external device identifier](https://help.adjust.com/en/article/external-device-identifiers) is a custom value that you can assign to a device or user. This helps you recognize users across sessions and platforms. External device IDs also help you deduplicate installs by user to avoid counting multiple new installs assoiciated with the same user. + +External device IDs can produce different results depending on your setup. If you want to use them, contact your Adjust representative. They will talk you through the best approach for your use case. + +You must set your external device ID in your `adjustConfig` instance before you call `Adjust.externalDeviceId`. You can't change this property after you've initialized the SDK. + +## Reference {% #reference %} + +To set an external device ID, call the `setExternalDeviceId` method of your `adjustConfig` instance with the following argument: + +{% deflist %} +`externalDeviceId`: `String` + +: Your external device identifier. +{% /deflist %} + +```actionscript-3 +public class Example extends Sprite { + public function Example() { + var appToken:String = "{YourAppToken}"; + var environment:String = AdjustEnvironment.SANDBOX; + + var adjustConfig:AdjustConfig = new AdjustConfig(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel.VERBOSE); + + adjustConfig.setExternalDeviceId("{Your-External-Device-Id}"); + + Adjust.initSdk(adjustConfig); + } + } + + Adjust.externalDeviceId(); + +``` + +If you want to use the external device ID in your business analytics, you can pass it as a [global callback parameters](/en/sdk/features/global-parameters). + +You can import existing external device IDs into Adjust. This ensures that Adjust servers match future data to your existing device records. Contact your Adjust representative for more information. + +## Tutorial: Set an external device ID {% #tutorial %} diff --git a/src/content/docs/en/sdk/adobe-air/features/global-parameters.mdoc b/src/content/docs/en/sdk/adobe-air/features/global-parameters.mdoc new file mode 100644 index 000000000..a834f54bc --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/global-parameters.mdoc @@ -0,0 +1,160 @@ +--- +title: Set up global callback and partner parameters +description: Send information to your callback URL and to network partners with each session. +sidebar-label: Set up global parameters +sidebar-position: 7 +--- + +The Adjust SDK enables you to send additional information to Adjust to forward to your callback URL and network partners. Global parameters are string key-value pairs that you can use to communicate more information about a device or user. + +> Is this correct? +The Adjust SDK merges session callback parameters with event callback parameters. Event callback parameters take priority over session callback parameters. This means that if you add a parameter key to both an event and a session, the SDK sends the event parameter. + +Learn more about [event callbacks](/en/sdk/adobe-air/features/events). + +## Global callback parameters {% #global-callback-parameters %} + +If you [register a callback URL](https://help.adjust.com/en/article/set-up-callbacks) in the Adjust dashboard, Adjust sends a `GET` request to your callback URL when the SDK sends session data. To append parameters to this callback request, set the global parameters in your code. + +{% callout type="tip" %} +Adjust doesn’t store your custom callback parameters. Custom parameters are only appended to your callback URL. + +If you use CSV uploads, make sure to add the parameters to your CSV definition. +{% /callout %} + +### Reference {% #global-callback-parameters-reference %} + +The `Adjust` class methods manage the global callback parameters. You can add and remove individual parameters, or reset all parameters at once. + +### Add a global callback parameter {% #add-global-callback-parameter %} + +To add a global callback parameter, call the `Adjust.addGlobalCallbackParameter` method with the following arguments: + +{% deflist %} +`key`: `String` + +: The parameter key. + +`value`: `String` + +: The parameter value. +{% /deflist %} + +You can add multiple parameters by calling the `Adjust.addGlobalCallbackParameter` method multiple times. + +```actionscript-3 +Adjust.addGlobalCallbackParameter("key", "value"); +Adjust.addGlobalCallbackParameter("user_id", "855"); +``` + +### Remove a global callback parameter {% #remove-global-callback-parameter %} + +You can remove specific global callback parameters. To do that, call the `Adjust.removeGlobalCallbackParameter` method with the following argument: + +{% deflist %} +`key`: `String` + +: The key of the parameter you want to remove. +{% /deflist %} + +```actionscript-3 +Adjust.removeGlobalCallbackParameter("user_id"); +``` + +### Remove all global callback parameters {% #remove-all-global-callback-parameter %} + +To remove all global callback parameters at once, call the `Adjust.removeGlobalCallbackParameters` method. + +This method removes all active global callback parameters, meaning you won't receive any parameters in callbacks from Adjust. + +```actionscript-3 +Adjust.removeGlobalCallbackParameters(); +``` + +## Global partner parameters {% #global-partner-parameters %} + +You can send extra information to your network partners by adding partner parameters. Sharing additional parameters with your external partners enables more granular analysis and facilitates retargeting. + +When the Adjust SDK sends session data, Adjust's servers forward any global partner parameters to the partners you've configured. + +> Is this correct? +Partner parameters don't appear in raw data by default. You can add the `{partner_parameters}` placeholder to receive them as a single string. + +Read [choose data sharing options](https://help.adjust.com/en/article/data-sharing-ad-network) to learn how to configure what data you share with external partners. + +### Reference {% #global-partner-parameters-reference %} + +The `Adjust` class methods manage the global partner parameters. You can add and remove individual parameters, or reset all parameters at once. + +### Add a global partner parameter {% #add-global-partner-parameter %} + +To add a global partner parameter, call the `Adjust.addGlobalPartnerParameter` method with the following arguments: + +{% deflist %} +`key`: `String` + +: The parameter key. + +`value`: `String` + +: The parameter value. +{% /deflist %} + +You can add multiple parameters by calling the `Adjust.addGlobalPartnerParameter` method multiple times. + +```actionscript-3 +Adjust.addGlobalPartnerParameter("key", "value"); +Adjust.addGlobalPartnerParameter("user_id", "855"); +``` + +### Remove a global partner parameter {% #remove-global-partner-parameter %} + +To remove a global partner parameter, call the `Adjust.removeGlobalPartnerParameter` method with the following argument: + +{% deflist %} +`key`: `String` + +: The key of the parameter you want to remove. +{% /deflist %} + +```actionscript-3 +Adjust.removeGlobalPartnerParameter("key"); +``` + +### Remove all global partner parameters {% #remove-all-global-partner-parameter %} + +To remove all global partner parameters at once, call the `Adjust.removeGlobalPartnerParameters` method. + +This method removes all active global partner parameters, meaning no parameters will be sent to network partners. + +```actionscript-3 +Adjust.removeGlobalPartnerParameters(); +``` + +## Tutorial: Add and remove global parameters {% #tutorial %} + +> TODO: Adapt the code from the `README`: + +## Callback parameters + +For example, suppose you have registered the URL `https://www.mydomain.com/callback` for your event with event token `abc123` and execute the following lines: + +```actionscript-3 +var adjustEvent:AdjustEvent = new AdjustEvent("abc123"); +adjustEvent.addGlobalCallbackParameter("key", "value"); +adjustEvent.addGlobalCallbackParameter("user_id", "855"); +Adjust.trackEvent(adjustEvent); +``` + +The Adjust SDK measures the event and sends a request to your URL with the callback parameters. In this example, your callback looks like this: + +`https://www.mydomain.com/callback?key=value&user_id=855` + +## Partner parameters + +```actionscript-3 +var adjustEvent:AdjustEvent = new AdjustEvent("abc123"); +adjustEvent.addGlobalPartnerParameter("key", "value"); +adjustEvent.addGlobalPartnerParameter("user_id", "855"); +Adjust.trackEvent(adjustEvent); +``` diff --git a/src/content/docs/en/sdk/adobe-air/features/index.mdoc b/src/content/docs/en/sdk/adobe-air/features/index.mdoc new file mode 100644 index 000000000..3330e8222 --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/index.mdoc @@ -0,0 +1,8 @@ +--- +title: Adobe AIR SDK integration guide +description: Use the Adobe AIR SDK to access Adjust's features in your apps +category-title: Features +sidebar-position: 11 +type: category +--- + diff --git a/src/content/docs/en/sdk/adobe-air/features/preinstalled.mdoc b/src/content/docs/en/sdk/adobe-air/features/preinstalled.mdoc new file mode 100644 index 000000000..7182004da --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/preinstalled.mdoc @@ -0,0 +1,38 @@ +--- +title: Send preinstalled app activity +description: Configure a default link token for preinstalled apps. +sidebar-position: 3 +--- + +You can use the Adjust SDK to send Adjust activity from apps that came preinstalled on a user's device. This enables you to send information from users who didn't download your app from a campaign. + +You can send data from preinstalled apps to a predefined default link. When a user opens the app for the first time, the install session is associated with the default link token. + +Configuring a default link token enables you to attribute all preinstalls to a predefined Adjust link. Adjust records all information against this token until the attribution source changes. + +## Reference {% #reference %} + +To set your default link token, call the `setDefaultTracker` method of your `AdjustConfig` instance with the following argument: + +{% deflist %} +`token`: `String` + +: Your alphanumeric Adjust link token. +{% /deflist %} + +## Tutorial: Set a default link token {% #tutorial %} + +1. [Create a new campaign link in Campaign Lab](https://help.adjust.com/en/article/links). Your link structure should be similar to this: + `https://app.adjust.com/{token}`. + +1. Copy this token and assign it to the `setDefaultTracker` property of your `adjustConfig` instance. + + ```actionscript-3 + var adjustConfig:AdjustConfig = new AdjustConfig(appToken, environment); + adjustConfig.setDefaultTracker("{abc123}"); + + Adjust.initSdk(adjustConfig); + ``` + +1. Build and run your app. If you have logging enabled, you should see a message like the following in your app's log output: + `Default token: 'abc123'` diff --git a/src/content/docs/en/sdk/adobe-air/features/privacy.mdoc b/src/content/docs/en/sdk/adobe-air/features/privacy.mdoc new file mode 100644 index 000000000..40208e549 --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/privacy.mdoc @@ -0,0 +1,56 @@ +--- +title: Set up privacy features +description: Configure features that you can use to handle user privacy in your app. +sidebar-position: 9 +--- + +The Adobe AIR SDK offers features that you can use to manage users' privacy in your app. + +## Send erasure request {% #send-erasure-request %} + +The EU’s General Data Protection Regulation (GDPR) and similar privacy laws worldwide (CCPA, LGPD, etc.) grant users comprehensive rights when it comes to the processing of their personal data. These rights include, among others, the right to erasure (see [Art. 17 GDPR](https://gdpr.eu/article-17-right-to-be-forgotten/))([1](https://help.adjust.com/en/article/gdpr#ref-1)). As a data processor, Adjust is obliged to support you (the data controller) in processing such requests from your app users. + +To send a user’s erasure request to Adjust, call the `gdprForgetMe` method. + +```actionscript-3 +Adjust.gdprForgetMe(); +``` + +Once Adjust is notified, it will permanently delete the user’s historical personal data from all internal systems and database. +Adjust will no longer receive data from this user/device via the SDK.([2](https://help.adjust.com/en/article/gdpr#ref-2)) + +## Disable third party sharing globally {% #disable-sharing-globally %} + +You can use the Adjust SDK to record when a user changes their third-party sharing settings. + +You can configure third-party sharing settings with the `AdjustThirdPartySharing` class. To enable or disable all third-party sharing, use the `trackThirdPartySharing` method. + +1. Create a new `AdjustThirdPartySharing` instance and pass the `false` parameter. +1. Call the `trackThirdPartySharing` method with your `adjustThirdPartySharing` instance as an argument. + +### Reference {% #reference %} + +The `AdjustThirdPartySharing` class requires the following arguments: + +{% deflist %} +`adjustThirdPartySharing`: `AdjustThirdPartySharing` + +: A class that receives users' consent to share their data with third parties. + +`trackThirdPartySharing`: `trackThirdPartySharing` + +: A method that enables or disables all third-party sharing. + +`false`: `Boolean` + +: A parameter that disable the third-party sharing option. +{% /deflist %} + +```actionscript-3 +var adjustThirdPartySharing:AdjustThirdPartySharing = new AdjustThirdPartySharing("false"); +Adjust.trackThirdPartySharing(adjustThirdPartySharing); +``` + +Once Adjust has been notified, it stops sharing users' data with third parties. The Adjust SDK continues to work as expected. + +> What about the rest of the privacy-related features? See https://dev.adjust.com/en/sdk/flutter/features/privacy diff --git a/src/content/docs/en/sdk/adobe-air/features/push-tokens.mdoc b/src/content/docs/en/sdk/adobe-air/features/push-tokens.mdoc new file mode 100644 index 000000000..ab801b917 --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/push-tokens.mdoc @@ -0,0 +1,28 @@ +--- +title: Send push tokens +description: Send push tokens to Adjust to inform audiences and uninstall and reinstall measurement. +sidebar-position: 8 +--- + +Push notifications enable you to deliver personalized content to your users. You can use [deep links](/en/sdk/adobe-air/android/deep-links) to direct users to specific pages in your app, and measure reattributions. + +- The push token is a unique identifier that you can use to sort [Audiences](https://help.adjust.com/en/article/audiences) and client callbacks. +- Push tokens are also required for [uninstall and reinstall measurement](https://help.adjust.com/en/article/uninstalls-reinstalls). + +## Reference {% #reference %} + +The `AdjustConfig` contains a string `pushToken` property that you can use to store your push token. To update this property, call the `setPushToken` method. + +The `setPushToken` method requires the following arguments: + +{% deflist %} +`pushToken`: `String` + +: The device's push token. +{% /deflist %} + +```actionscript-3 +Adjust.setPushToken("PushNotificationsToken"); +``` + +## Tutorial: Send a push token {% #tutorial %} diff --git a/src/content/docs/en/sdk/adobe-air/features/session-event-callbacks.mdoc b/src/content/docs/en/sdk/adobe-air/features/session-event-callbacks.mdoc new file mode 100644 index 000000000..666ba091c --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/session-event-callbacks.mdoc @@ -0,0 +1,218 @@ +--- +title: Set up session and event callbacks +description: Configure session and event callbacks from your app to Adjust. +sidebar-position: 5 +--- + +Set up callbacks to trigger functions when the SDK sends information to Adjust. You can set up callbacks for successful and failed sessions and events. + +{% callout type="important" %} +You must [register your callbacks](https://help.adjust.com/en/article/set-up-callbacks) before initializing the SDK. +{% /callout %} + +## Reference {% #reference %} + +The callback function is called after the SDK tries to send a package to the server. Within the callback, you have access to a response data object. These are the session and event response data properties: + +{% deflist %} +`message`: `String` + +: The message from the server or the error logged by the SDK. + +`timestamp`: `String` + +: The timestamp from Adjust’s servers. + +`adid`: `String` + +: A unique device identifier provided by Adjust. + +`jsonResponse`: `String` + +: The JSON string with the response from the server. + +`willRetry`: `Boolean` + +: Indicates whether there will be an attempt to resend a failed package. +{% /deflist %} + +Eevent response data objects also support the following properties: + +{% deflist %} +`eventToken`: `String` + +: The event token. + +`callbackId`: `String` + +: The [custom callback ID](/en/sdk/adobe-air/events#callback-identifier) set on the event object. +{% /deflist %} + +## Session callbacks {% #session-callbacks %} + +You can set up session callbacks to trigger functions when the SDK sends session information. + +Adjust supports success and failure callbacks: + +- Success callbacks trigger when the SDK sends information to Adjust’s servers. +- Failure callbacks trigger when the SDK encounters a problem while sending the information. + +### Session success callbacks {% #session-success %} + +Set up success callbacks to trigger functions when the SDK records a session. + +To register a successful session recording by the SDK, call the `setSessionSuccessCallback` with any of the following properties: + +```actionscript-3 +adjustConfig.setSessionSuccessCallback(function (sessionSuccess:AdjustSessionSuccess):void { + // All session success properties. + trace("Session tracking succeeded"); + trace("Message = " + sessionSuccess.getMessage()); + trace("Timestamp = " + sessionSuccess.getTimestamp()); + trace("Adid = " + sessionSuccess.getAdid()); + trace("Json Response = " + sessionSuccess.getJsonResponse()); +}); +``` + +#### Successfully tracked session snippet: + +This example demonstrates how to register a `sessionSuccessCallback` that outputs a JSON object with the timestamp at which the SDK sent the session data to Adjust, as well as the device `ADID`. + +```actionscript-3 +package { + import com.adjust.sdk.Adjust; + import com.adjust.sdk.AdjustConfig; + import com.adjust.sdk.AdjustEnvironment; + import com.adjust.sdk.AdjustLogLevel; + import com.adjust.sdk.AdjustSessionSuccess; + + public class Example extends Sprite { + public function Example() { + var appToken:String = "{YourAppToken}"; + var environment:String = AdjustEnvironment.SANDBOX; + + var adjustConfig:AdjustConfig = new AdjustConfig(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel.VERBOSE); + + adjustConfig.setSessionSuccessCallback(sessionSuccessCallback); + + Adjust.initSdk(adjustConfig); + } + + // ... + + private static function sessionSuccessCallback(sessionSuccess:AdjustSessionSuccess):void { + trace("Session tracking succeeded"); + trace("Message = " + sessionSuccess.getMessage()); + trace("Timestamp = " + sessionSuccess.getTimestamp()); + trace("Adid = " + sessionSuccess.getAdid()); + trace("Json Response = " + sessionSuccess.getJsonResponse()); + } + } +} +``` + +### Session failure callbacks {% #session-failure %} + +Set up failure callbacks to trigger functions when the SDK fails to record a session. + +To register a failed session recording by the SDK, call the `setSessionFailureCallback` with any of the following properties: + +```actionscript-3 +adjustConfig.setSessionFailureCallback(function (sessionFailure:AdjustSessionFailure):void { + // All session failure properties. + trace("Session tracking failed"); + trace("Message = " + sessionFailure.getMessage()); + trace("Timestamp = " + sessionFailure.getTimestamp()); + trace("Adid = " + sessionFailure.getAdid()); + trace("Will Retry = " + sessionFailure.getWillRetry().toString()); + trace("Json Response = " + sessionFailure.getJsonResponse()); +}); +``` + +#### Failed tracked session snippet: + +This example demonstrates how to register a `sessionFailureCallback` that outputs a JSON object with the reason the SDK failed to send the session data, as well as the timestamp at which the SDK sent the session data to Adjust and the device `ADID`. + +```actionscript-3 +package { + import com.adjust.sdk.Adjust; + import com.adjust.sdk.AdjustConfig; + import com.adjust.sdk.AdjustEnvironment; + import com.adjust.sdk.AdjustLogLevel; + import com.adjust.sdk.AdjustSessionFailure; + + public class Example extends Sprite { + public function Example() { + var appToken:String = "{YourAppToken}"; + var environment:String = AdjustEnvironment.SANDBOX; + + var adjustConfig:AdjustConfig = new AdjustConfig(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel.VERBOSE); + + adjustConfig.setSessionFailureCallback(sessionFailureCallback); + + Adjust.initSdk(adjustConfig); + } + + // ... + + private static function sessionFailureCallback(sessionFailure:AdjustSessionFailure):void { + trace("Session tracking Failed"); + trace("Message = " + sessionFailure.getMessage()); + trace("Timestamp = " + sessionFailure.getTimestamp()); + trace("Adid = " + sessionFailure.getAdid()); + trace("Will Retry = " + sessionFailure.getWillRetry().toString()); + trace("Json Response = " + sessionFailure.getJsonResponse()); + } + } +} +``` + +## Event callbacks {% #event-callbacks %} + +You can set up event callbacks to trigger functions when the SDK sends event information. + +Adjust supports success and failure callbacks: + +- Success callbacks trigger when the SDK sends information to Adjust’s servers. +- Failure callbacks trigger when the SDK encounters a problem while sending the information. + +> TODO: Add sample snippets +`import com.adjust.sdk.AdjustEventSuccess;` +`import com.adjust.sdk.AdjustEventFailure;` + +### Event success callbacks {% #event-success %} + +To register a successful event recording by the SDK, call the `setEventSuccessCallback` with any of the following properties: + +```actionscript-3 +adjustConfig.setEventSuccessCallback(function (eventSuccess:AdjustEventSuccess):void { + // All event success properties. +trace("Event tracking succeeded"); +trace("Message = " + eventSuccess.getMessage()); +trace("Timestamp = " + eventSuccess.getTimestamp()); +trace("Adid = " + eventSuccess.getAdid()); +trace("Event Token = " + eventSuccess.getEventToken()); +trace("Callback Id = " + eventSuccess.getCallbackId()); +trace("Json Response = " + eventSuccess.getJsonResponse()); +}); +``` + +### Event failure callbacks {% #event-failure %} + +To register a failed event recording by the SDK, call the `setEventFailureCallback` with any of the following properties: + +```actionscript-3 +adjustConfig.setEventFailureCallback(function (eventFailure:AdjustEventFailure):void { + // All event failure properties. + trace("Event tracking failed"); + trace("Message = " + eventFailure.getMessage()); + trace("Timestamp = " + eventFailure.getTimestamp()); + trace("Adid = " + eventFailure.getAdid()); + trace("Event Token = " + eventFailure.getEventToken()); + trace("Callback Id = " + eventFailure.getCallbackId()); + trace("Will Retry = " + eventFailure.getWillRetry().toString()); + trace("Json Response = " + eventFailure.getJsonResponse()); +}); +``` diff --git a/src/content/docs/en/sdk/adobe-air/features/skadnetwork-handling.mdoc b/src/content/docs/en/sdk/adobe-air/features/skadnetwork-handling.mdoc new file mode 100644 index 000000000..0c7e573ed --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/features/skadnetwork-handling.mdoc @@ -0,0 +1,29 @@ +--- +title: Manage SKAdNetwork +description: Manage how your iOS app communicates with SKAdNetwork. +sidebar-position: 3 +--- + +{% callout type="important" %} +This feature is only available on devices running iOS 14 and above. It requires Adjust iOS SDK v4.22.0 or above. +{% /callout %} + +StoreKit Ad Network (SKAdNetwork) is Apple’s framework for app install and reinstall attribution. This is the SKAdNetwork workflow: + +1. Apple gathers attribution information and notifies the relevant ad network. +1. The network sends a postback with this information to Adjust. +1. Adjust displays SKAdNetwork data in [Datascape](https://help.adjust.com/en/suite/article/datascape). + +The Adobe AIR SDK communicates with SKAdNetwork by default, and registers for SKAdNetwork attribution upon initialization. + +## Disable SKAdNetwork communication {% #disable-skadnetwork-communication %} + +To disable the SKAdNetwork communication, call the `disableSkanAttribution` method on your `adjustConfig` instance. + +```actionscript-3 +adjustConfig.disableSkanAttribution(); +``` + +> What about the rest (conversion values, callback, etc)? See https://dev.adjust.com/en/sdk/flutter/features/skan + +## Tutorial {% #tutorial %} diff --git a/src/content/docs/en/sdk/adobe-air/index.mdoc b/src/content/docs/en/sdk/adobe-air/index.mdoc new file mode 100644 index 000000000..cb7ffd7b3 --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/index.mdoc @@ -0,0 +1,50 @@ +--- +title: Adobe AIR integration guide +description: Follow this guide to integrate the Adjust Adobe AIR SDK in your Android and iOS apps. +category-title: Adobe AIR SDK +sidebar-position: 1 +--- + +The Adobe AIR SDK provides you with a powerful tool to enhance your app's performance analytics. By integrating this SDK in your Android app, you can send essential data—such as install, session, and in-app event information—to Adjust. + +{% callout type="seealso" %} +The full source code is available [on GitHub](https://github.com/adjust/adobe_air_sdk). + +The [example app](/en/sdk/adobe-air/example-app) includes an implementation of all features available in the Adjust Adobe AIR SDK. +{% /callout %} + +## Integrate the SDK {% #integrate-the-sdk %} + +Follow the [integration guide](/en/sdk/adobe-air/integration) to add the Adobe AIR SDK to your app. This guide covers the following: + +1. [Install the SDK](/en/sdk/adobe-air/integration#install-the-sdk) +1. [Configure permissions](/en/sdk/adobe-air/integration#configure-permissions) +1. [Integrate the Adjust Adobe AIR SDK](/en/sdk/adobe-air/integration#integration-guide) + +## Set up features {% #set-up-features %} + +The Adobe AIR SDK has many features that enable you to record user activity. Follow these guides to configure the SDK: + +- [Set up a callback function to listen for attribution changes](/en/sdk/adobe-air/features/attribution). +- [Configure a default link token for preinstalled apps](/en/sdk/adobe-air/features/preinstalled). +- [Configure an external device ID for reporting](/en/sdk/adobe-air/features/external-device-id). +- [Use helper methods to add details to your callbacks](/en/sdk/adobe-air/features/device-information). +- [Manage users' privacy in your app](/en/sdk/adobe-air/features/privacy). +- [Set up App Tracking Transparency](/en/sdk/adobe-air/features/att-wrapper). +- [Manage how your iOS app communicates with SKAdNetwork.](/en/sdk/adobe-air/features/skadnetwork-handling). + +Follow these guides to add functionality to your app: + +- [Send event information to Adjust](/en/sdk/adobe-air/features/events). +- [Set up deep links](/en/sdk/adobe-air/features/deep-links). +- [Configure session and event callbacks](/en/sdk/adobe-air/features/session-event-callbacks). +- [Set up global callback and partner parameters](/en/sdk/adobe-air/features/global-parameters). +- [Send push tokens for uninstall measurement](/en/sdk/adobe-air/features/push-tokens). + +## Build your app for production {% #build-your-app-for-production %} + +After you've integrated the Adobe AIR SDK and completed [your testing](/en/sdk/testing), prepare your app for release. Make sure to do the following: + +- [ ] Ask your marketing team to set up all necessary campaigns in Adjust. +- [ ] Set your [logging level](/en/sdk/adobe-air/integration#integration-guide) according to your needs. +- [ ] Change [your environment](/en/sdk/adobe-air/integration#configure-the-sdk) to `AdjustEnvironment.PRODUCTION` to allow the SDK to send data in your production environment. diff --git a/src/content/docs/en/sdk/adobe-air/integration.mdoc b/src/content/docs/en/sdk/adobe-air/integration.mdoc new file mode 100644 index 000000000..ab3d572c1 --- /dev/null +++ b/src/content/docs/en/sdk/adobe-air/integration.mdoc @@ -0,0 +1,575 @@ +--- +title: Integration guide +description: Follow this guide to integrate the Adjust Adobe AIR SDK in your Android app. +sidebar-position: 1 +--- + +This is a step-by-step guide to help you integrate and configure the Adjust Adobe AIR SDK in your Android app. With this SDK, you can seamlessly integrate Adjust with your app, to capture and send attribution data and in-app event information. + +Follow this guide to set up and configure the SDK to send installs, sessions, custom in-app events, and other types of data to Adjust. + +## Set up your project {% #set-up-your-project %} + +Follow these steps to set up your project to support the Adjust Extension for Adobe Experience SDK. + +### Install the Adjust Extension {% #install-the-sdk %} + +Add the Adjust SDK extension to your app's descriptor file: + +```xml + + + com.adjust.sdk + + +``` + +## Initialize the SDK {% #initialize-the-sdk %} + +To initialize the Adobe AIR SDK v5, add the following code sample to your main `Sprite`: + +```actionscript-3 +package { + import com.adjust.sdk.Adjust; + import com.adjust.sdk.AdjustConfig; + import com.adjust.sdk.AdjustEnvironment; + import com.adjust.sdk.AdjustLogLevel; + + public class Example extends Sprite { + public function Example() { + var appToken:String = "{YourAppToken}"; + var environment:String = AdjustEnvironment.SANDBOX; + + var adjustConfig:AdjustConfig = new AdjustConfig(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel.VERBOSE); + + Adjust.initSdk(adjustConfig); + } + } +} + +``` + +### Configure permissions {% #configure-permissions %} + +The Adjust SDK bundles all required permissions by default. You don't need to add any permissions for it to work. + +#### COPPA (Children's Online Privacy Protection Act) compliance + +`com.google.android.gms.permission.AD_ID` is bundled in the Adjust SDK for Android. You can [remove it](/en/sdk/android#add-permissions) with the following snippet: + +{% codeblock title="YOURAPP-app.xml" %} +```xml + + + + + + ]]> + + +``` +{% /codeblock %} + +Check the [Apps for children](/en/sdk/apps-for-children) guide for more information about COPPA compliance. + +### Add Google Play Services {% #add-google-play-services %} + +Apps that target the Google Play Store must use the `gps_adid` ([Google Advertising ID](https://support.google.com/googleplay/android-developer/answer/6048248?hl=en)) to identify devices. To access the `gps_adid`, you need to integrate the Google Play Services. + +1. Add the Google Play Services extension to your app's descriptor file: + + ```xml + + + com.adjust.gps + + + ``` + +1. Add the following lines inside the `` tag body of your app's Android manifest file: + + ```xml + + ``` + +### Set up Google Play Install Referrer API {% #set-up-install-referrer %} + +The install referrer is a unique identifier which you can use to attribute an app install to a source. The Adjust SDK requires this information to perform attribution. + +To support the Google Play Install Referrer API, follow these steps: + +1. Add the ANE extension to your app's XML descriptor file: + + ```xml + + + com.adjust.installref + + + ``` + +1. Add Android permission to allow the install referrer ANE to fetch install referrer data: + + ```xml + + + + + + + + + ]]> + + + ``` + +## Integration guide {% #integration-guide %} + +> TODO: Adapt the tutorial to Adobe AIR + +Once you've completed the project setup steps, you can integrate the Adjust SDK. The following guide shows you how to: + +1. Add the Adjust Adobe AIR app. +1. Set your logging level to **verbose** to retrieve as much detail as possible from the extension. +1. Test the SDK in **sandbox** mode to ensure it sends data to Adjust. +1. Enable your app to open deep links. +1. Register with the Adobe Experience SDK. + +To do this, you need to create two files: + +- `Main.as`: you'll configure and register the Adjust SDK in this file. +- `Main-app.xml`: your app's descriptor file. + +### Import classes {% #import-classes %} + +First, you need to import some classes into your application files. Import the following classes into your `Main.as` file: + +{% deflist %} +`com.adjust.sdk.Adjust;` + +: Used to + +`com.adjust.sdk.AdjustConfig;` + +: Used to + +`com.adjust.sdk.AdjustEvent;` + +: Used to + +`com.adjust.sdk.AdjustEventSuccess;` + +: Used to + +`com.adjust.sdk.AdjustEventFailure;` + +: Used to + +`com.adjust.sdk.AdjustSessionSuccess;` + +: Used to + +`com.adjust.sdk.AdjustSessionFailure;` + +: Used to + +`com.adjust.sdk.AdjustAttribution;` + +: Used to + +`com.adjust.sdk.Environment;` + +: Used to + +`import com.adjust.sdk.LogLevel;` + +: Used to + +`import com.adjust.sdk.UrlStrategy;` + +: Used to +{% /deflist %} + +```actionscript-3 +// Main.as +import com.adjust.sdk.Adjust; +import com.adjust.sdk.AdjustConfig; +import com.adjust.sdk.AdjustEvent; +import com.adjust.sdk.AdjustEventSuccess; +import com.adjust.sdk.AdjustEventFailure; +import com.adjust.sdk.AdjustSessionSuccess; +import com.adjust.sdk.AdjustSessionFailure; +import com.adjust.sdk.AdjustAttribution; +import com.adjust.sdk.Environment; +import com.adjust.sdk.LogLevel; +import com.adjust.sdk.UrlStrategy; +``` + +### Create a global application class {% #create-a-global-application-class %} + +The recommended way to register the Adjust Android Extension for Adobe Experience SDK is to use a global Android [Application class](http://developer.android.com/reference/android/app/Application.html). If you've not yet created an Application, follow these steps: + +1. Create a new class that extends `Application` in your `Main.as` file. + + {% codeblock title="Main.as" %} + ```java + public class MainApp extends Application {} + ``` + {% /codeblock %} + +1. Open your `AndroidManifest.xml` and find the `` element. + +1. Add the name of your new class as an `android:name` attribute. In this example, the new `Application` class is named `MainApp`. + + ```xml + + + ``` + +1. Within your `Application` class, find or add the `onCreate` method. + + {% codeblock title="Main.as" highlight="{range: 2-5}" %} + ```java + public class MainApp extends Application { + @Override + public void onCreate() { + super.onCreate(); + } + } + ``` + {% /codeblock %} + +### Configure the Adjust Extension {% #configure-the-adjust-extension %} + +Once you've created the `Application` class and called `onCreate`, follow these steps to configure the Adjust Android Extension for Adobe Experience SDK: + +1. Inside your `onCreate` function, call `MobileCore.setApplication(this)` to register the application context. + + {% codeblock title="Main.as" highlight="{range: 4}, {range: 11}" %} + ```java + public void onCreate() { + super.onCreate(); + + MobileCore.setApplication(this); + } + ``` + {% /codeblock %} + +1. Set your logging level by calling the `MobileCore.setLogLevel` method with the following argument: + + {% deflist %} + `logLevel`: `String` + + : The level of logging you want to enable. + + - `LoggingMode.VERBOSE`: enable all logging. + - `LoggingMode.DEBUG`: disable verbose logging. + - `LoggingMode.WARNING`: log only errors and warnings. + - `LoggingMode.ERROR`: log only errors. + {% /deflist %} + + {% codeblock title="Main.as" highlight="{range:4-5}" %} + ```java + public void onCreate() { + super.onCreate(); + + MobileCore.setApplication(this); + MobileCore.setLogLevel(LoggingMode.VERBOSE); + } + ``` + {% /codeblock %} + +1. Create a new `try...catch` block to configure the Adjust Extension: + + {% codeblock title="Main.as" highlight="{range: 7-10}" %} + ```java + public void onCreate() { + super.onCreate(); + + MobileCore.setApplication(this); + MobileCore.setLogLevel(LoggingMode.VERBOSE); + + try { + } catch (Exception e) { + Log.e("example", "Exception occurred during configuration: " + e.getMessage()); + } + } + ``` + {% /codeblock %} + +1. Within your `try` block, call `MobileCore.configureWithAppID` and pass your Adobe app ID. + + {% codeblock title="Main.as" highlight="{range: 2}" %} + ```java + try { + MobileCore.configureWithAppID("your_adobe_app_id"); + } catch (Exception e) { + Log.e("example", "Exception occurred during configuration: " + e.getMessage()); + } + ``` + {% /codeblock %} + +1. Within your `try` block, create a new instance of `AdjustAdobeExtensionConfig` with the following argument: + + {% deflist %} + `environment`: `String` + + : The environment in which your device is running. + + - Pass `AdjustAdobeExtensionConfig.ENVIRONMENT_SANDBOX` when testing. + - Pass `AdjustAdobeExtensionConfig.ENVIRONMENT_PRODUCTION` when running the app in production. + {% /deflist %} + + {% codeblock title="Main.as" highlight="{range: 4-5}" %} + ```java + try { + MobileCore.configureWithAppID("your_adobe_app_id"); + + AdjustAdobeExtensionConfig config = + new AdjustAdobeExtensionConfig(AdjustAdobeExtensionConfig.ENVIRONMENT_SANDBOX); + } catch (Exception e) { + Log.e("example", "Exception occurred during configuration: " + e.getMessage()); + } + ``` + {% /codeblock %} + +1. Call `AdjustAdobeExtension.setConfiguration` with your `AdjustAdobeExtensionConfig` instance as an argument. + + {% codeblock title="Main.as" highlight="{range: 6}" %} + ```java + try { + MobileCore.configureWithAppID("your_adobe_app_id"); + + AdjustAdobeExtensionConfig config = + new AdjustAdobeExtensionConfig(AdjustAdobeExtensionConfig.ENVIRONMENT_SANDBOX); + AdjustAdobeExtension.setConfiguration(config); + } catch (Exception e) { + Log.e("example", "Exception occurred during configuration: " + e.getMessage()); + } + ``` + {% /codeblock %} + +### Register the Adjust Extension {% #register-the-adjust-extension %} + +Once you've configured the Adjust Extension, you need to register it with the Adobe Experience SDK. To do this: + +1. Create a new `try...catch` block below your configuration block. + + {% codeblock title="Main.as" highlight="{range: 19-22}" %} + ```java + public class MainApp extends Application { + @Override + public void onCreate() { + super.onCreate(); + + MobileCore.setApplication(this); + MobileCore.setLogLevel(LoggingMode.VERBOSE); + + try { + MobileCore.configureWithAppID("your_adobe_app_id"); + + AdjustAdobeExtensionConfig config = + new AdjustAdobeExtensionConfig(AdjustAdobeExtensionConfig.ENVIRONMENT_SANDBOX); + AdjustAdobeExtension.setConfiguration(config); + } catch (Exception e) { + Log.e("example", "Exception occurred during configuration: " + e.getMessage()); + } + + try { + } catch (Exception e) { + Log.e("example", "Exception occurred while registering Extension: " + e.getMessage()); + } + } + } + ``` + {% /codeblock %} + +1. Within your `try` block, create a new list of the extensions you want to register. The example in this guide imports the `Analytics` and `Identity` extensions in addition to the `AdjustAdobeExtension`. + + {% deflist %} + `extensions`: `List>` + + : Your list of extensions. + {% /deflist %} + + {% codeblock title="Main.as" highlight="{range: 2-5}" %} + ```java + try { + List> extensions = Arrays.asList( + Analytics.EXTENSION, + Identity.EXTENSION, + AdjustAdobeExtension.EXTENSION); + } catch (Exception e) { + Log.e("example", "Exception occurred while registering Extension: " + e.getMessage()); + } + ``` + {% /codeblock %} + +1. Inside your `try` block, call the `MobileCore.registerExtensions` method with your list of extensions and the following callback argument: + + {% deflist %} + `completionCallback`: `AdobeCallback` + + : A callback function that fires when registration completes. + {% /deflist %} + + {% codeblock title="Main.as" highlight="{range: 6-10}" %} + ```java + try { + List> extensions = Arrays.asList( + Analytics.EXTENSION, + Identity.EXTENSION, + AdjustAdobeExtension.EXTENSION); + MobileCore.registerExtensions(extensions, new AdobeCallback() { + @Override + public void call(Object o) { + Log.d("example", "Adjust Adobe Extension SDK initialized"); + } + }); + } catch (Exception e) { + Log.e("example", "Exception occurred while registering Extension: " + e.getMessage()); + } + ``` + {% /codeblock %} + +### Set up your activity file {% #set-up-your-activity-file %} + +Next, you need to set up your `MainActivity.java` file. You'll use this file to set up your Adjust features later. For the purposes of this guide, you're only going to set up the `onCreate` function to handle application startup. + +1. Create a new public class called `MainActivity`. This class should extend the `AppCompatActivity` class. + + {% codeblock title="MainActivity.java" %} + ```java + public class MainActivity extends AppCompatActivity {} + ``` + {% /codeblock %} + +1. Create a new protected override function called `onCreate`. This function receives the `savedInstanceState` and returns `void`. + + {% codeblock title="MainActivity.java" highlight="{range: 2-3}" %} + ```java + public class MainActivity extends AppCompatActivity { + @Override + protected void onCreate(Bundle savedInstanceState) {} + } + ``` + {% /codeblock %} + +1. Within your `onCreate` function, call `super.onCreate` with the `savedInstanceState` to create your activity. + + {% codeblock title="MainActivity.java" highlight="{range: 3}" %} + ```java + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + } + ``` + {% /codeblock %} + +1. Next, call `setContentView` to map your activity to your app layout. In this example, the layout file is called `activity_main.xml`. + + {% codeblock title="MainActivity.java" highlight="{range: 4}" %} + ```java + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + } + ``` + {% /codeblock %} + +### Set up deep link handling {% #set-up-deep-link-handling %} + +To configure the Adjust Android Extension for Adobe Experience SDK to open deep links, follow these steps: + +1. Create a new `Intent` variable called `intent` inside your `onCreate` function and assign it the output of `getIntent()`. + + {% codeblock title="MainActivity.java" highlight="{range: 6}" %} + ```java + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Intent intent = getIntent(); + } + ``` + {% /codeblock %} + +1. Create a new `Uri` variable called `data` and assign it the output of `intent.getData()`. + + {% codeblock title="MainActivity.java" highlight="{range: 7}" %} + ```java + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Intent intent = getIntent(); + Uri data = intent.getData(); + } + ``` + {% /codeblock %} + +1. Construct a new `AdjustDeeplink` instance with your `data` variable. + + {% codeblock title="MainActivity.java" highlight="{range: 8}" %} + ```java + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Intent intent = getIntent(); + Uri data = intent.getData(); + AdjustDeeplink adjustDeeplink = new AdjustDeeplink(data); + } + ``` + {% /codeblock %} + +1. To open the URL, pass your `AdjustDeeplink` instance and `getApplicationContext()` to the `Adjust.processDeeplink` method. + + {% codeblock title="MainActivity.java" highlight="{range: 9}" %} + ```java + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Intent intent = getIntent(); + Uri data = intent.getData(); + AdjustDeeplink adjustDeeplink = new AdjustDeeplink(data); + Adjust.processDeeplink(adjustDeeplink, getApplicationContext()); + } + ``` + {% /codeblock %} + + If you use [short branded links](https://help.adjust.com/en/article/short-branded-links), you can alternatively use the `Adjust.processAndResolveDeeplink` method to resolve your shortened link and return it to a callback function. + + {% codeblock title="MainActivity.java" highlight="{range: 9-14}" %} + ```java + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Intent intent = getIntent(); + Uri data = intent.getData(); + AdjustDeeplink adjustDeeplink = new AdjustDeeplink(data); + Adjust.processAndResolveDeeplink(adjustDeeplink, getApplicationContext(), new OnDeeplinkResolvedListener() { + @Override + public void onDeeplinkResolved(String s) { + Log.d("example", "Unwrapped short link: " + s); + } + }); + } + ``` + {% /codeblock %} + +Once you've completed these steps, build and run your app. In your log viewer, set the filter `tag:Adjust` to show only logs relating to the Adjust SDK. After you launch your app, you should see the message `Install tracked`. diff --git a/src/content/docs/en/sdk/migration/adobe-air/index.mdoc b/src/content/docs/en/sdk/migration/adobe-air/index.mdoc new file mode 100644 index 000000000..cb97a6713 --- /dev/null +++ b/src/content/docs/en/sdk/migration/adobe-air/index.mdoc @@ -0,0 +1,8 @@ +--- +title: Adobe AIR +sidebar-label: Adobe Air +description: Follow these guides to migrate to the latest SDK version +type: category +sidebar-position: 8 +--- + diff --git a/src/content/docs/en/sdk/migration/adobe-air/v4-to-v5.mdoc b/src/content/docs/en/sdk/migration/adobe-air/v4-to-v5.mdoc new file mode 100644 index 000000000..88979c56e --- /dev/null +++ b/src/content/docs/en/sdk/migration/adobe-air/v4-to-v5.mdoc @@ -0,0 +1,539 @@ +--- +title: Adobe AIR SDK v5 migration guide +description: Follow this guide to upgrade from SDK v4 to SDK v5 +sidebar-label: SDK v5 migration guide +sidebar-position: 1 +--- + +The [Adjust Adobe AIR SDK](https://github.com/adjust/adobe_air_sdk) has been updated to v5. Follow this guide to migrate from v4 to the latest version. + +## Before you begin {% #before-you-begin %} + +The minimum supported iOS and Android versions have been updated. If your app targets a lower version, update it first. + +- iOS: **12.0** +- Android: **21** + +### Update the initialization method {% #init-method %} + +{% minorversion changed="v5" /%} + +In Adobe AIR SDK v5, the initialization method has changed from `Adjust.start` to `Adjust.initSdk`. + +```actionscript-3 +Adjust.initSdk(adjustConfig); +``` + +#### Environment + +In Adobe AIR SDK v5, the environment class has been renamed from `Environment` to `AdjustEnvironment`. + +```actionscript-3 +var environment:String = AdjustEnvironment.SANDBOX; +``` + +{% deflist %} +`environment`: `String` + +: The environment in which your device is running. + +- Pass `AdjustEnvironment.SANDBOX` when testing. +- Pass `AdjustEnvironment.PRODUCTION` when running the app in production. +{% /deflist %} + +#### Log level + +In Adobe AIR SDK v5, the log level class has been renamed from `LogLevel` to `AdjustLogLevel`. + +```actionscript-3 +adjustConfig.setLogLevel(AdjustLogLevel.VERBOSE); +``` + +{% deflist %} +`setLogLevel`: `String` + +: The level of logging you want to enable. + +- `adjustConfig.setLogLevel(AdjustLogLevel.VERBOSE)`: enable all logging +- `adjustConfig.setLogLevel(AdjustLogLevel.DEBUG)`: disable verbose logging. +- `adjustConfig.setLogLevel(AdjustLogLevel.INFO)`: the default: Log information, warnings, and errors. +- `adjustConfig.setLogLevel(AdjustLogLevel.WARN)`: log only errors and warnings. +- `adjustConfig.setLogLevel(AdjustLogLevel.ERROR)`: log only errors. +- `adjustConfig.setLogLevel(AdjustLogLevel.ASSERT);`: disable errors. +- `adjustConfig.setLogLevel(AdjustLogLevel.SUPPRESS);`: disable all logging. +{% /deflist %} + +### Sample initialization snippet {% #sample-initialization-snippet %} + +To initialize the Adobe AIR SDK v5, adapt the following code sample: + +```actionscript-3 +package { + import com.adjust.sdk.Adjust; + import com.adjust.sdk.AdjustConfig; + import com.adjust.sdk.AdjustEnvironment; + import com.adjust.sdk.AdjustLogLevel; + + public class Example extends Sprite { + public function Example() { + var appToken:String = "{YourAppToken}"; + var environment:String = AdjustEnvironment.SANDBOX; + + var adjustConfig:AdjustConfig = new AdjustConfig(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel.VERBOSE); + + Adjust.initSdk(adjustConfig); + } + } +} + +``` + +### Android permissions {% #android-permissions %} + +In Adobe AIR SDK v4, you needed to declare several permissions to allow your Adobe AIR app for Android to access device information via the Adjust SDK for Android. + +{% codeblock title="YOURAPP-app.xml" %} +```xml + + + + + + + + + ]]> + + +``` +{% /codeblock %} + +In Adobe AIR SDK v5, you can delete some or all from your XML configuration file, depending on your setup. + +- `android.permission.INTERNET` is bundled in the Adjust SDK for Android. +- `android.permission.ACCESS_WIFI_STATE` is no longer required. +- `android.permission.ACCESS_NETWORK_STATE` is optional. This allows the SDK to access information about the network a device is connected to, and send this information as part of the callbacks parameters. + +#### COPPA (Children's Online Privacy Protection Act) compliance + +- `com.google.android.gms.permission.AD_ID` is bundled in the Adjust SDK for Android. You can [remove it](/en/sdk/android#add-permissions) with the following snippet: + +{% codeblock title="YOURAPP-app.xml" %} +```xml + + + + + + ]]> + + +``` +{% /codeblock %} + +Learn more about [Adjust's COPPA compliance](https://help.adjust.com/en/article/coppa-compliance). + +## Changes and removals {% #changes-removals %} + +Below is the complete list of changed, renamed, and [removed](#removed-apis) APIs in Adobe AIR SDK v5. + +Each section includes a reference to the previous and current API implementations, as well as a minimal code snippet that illustrates how to use the latest version. + +{% callout type="tip" %} +> TODO: To learn how to set up an Adobe AIR SDK v5 example app, follow a step-by-step tutorial to configure and implement all available features. +{% /callout %} + +## Changed APIs {% #changed-apis %} + +{% minorversion changed="v5" size="large" /%} + +The following APIs have changed in Adobe AIR SDK v5. + +### Disable and enable the SDK {% #disable-enable-sdk %} + +The `setEnabled` method has been renamed. Adobe AIR SDK v5 introduces two separate methods, for clarity: + +- Call `Adjust.disable` to disable the SDK. +- Call `Adjust.enable` to enable the SDK. + +```actionscript-3 +Adjust.disable(); // disable SDK +Adjust.enable(); // enable SDK +``` + +### Offline mode {% #offline-mode %} + +The `setOfflineMode` method has been renamed. Adobe AIR SDK v5 introduces two separate methods, for clarity: + +- Call `Adjust.switchToOfflineMode` to set the SDK to offline mode. +- Call `Adjust.switchBackToOnlineMode` to set the SDK back to online mode. + +```actionscript-3 +Adjust.switchToOfflineMode(); // set the SDK to offline mode +Adjust.switchBackToOnlineMode(); // set the SDK back to online mode +``` + +### Send information in background {% #send-in-background %} + +The `setSendInBackground` method has been renamed to `enableSendingInBackground`. + +To enable the Adobe AIR SDK v5 to send information to Adjust while your app is running in the background, call the `enableSendingInBackground` method on your `adjustConfig` instance. This feature is disabled by default. + +```actionscript-3 +adjustConfig.enableSendingInBackground(); +``` + +### Set attribution callback {% #attribution-callback %} + +In Adobe AIR SDK v5, the `setAttributionCallbackDelegate` method has been renamed to `setAttributionCallback`. + +The properties of the `attribution` parameter have also changed: + +- The `var adid:String` is no longer part of the attribution. +- The `getAdGroup()` getter method has been renamed to `getAdgroup()`. + +The following properties have been added to the `attribution` parameter: + +- `var costType:String` +- `var costAmount:Number` +- `var costCurrency:String` +- `var fbInstallReferrer:String` + +Below is a sample snippet that implements these changes: + +```actionscript-3 +adjustConfig.setAttributionCallback(function (attribution:AdjustAttribution):void { + trace("Tracker token = " + attribution.getTrackerToken()); + trace("Tracker name = " + attribution.getTrackerName()); + trace("Campaign = " + attribution.getCampaign()); + trace("Network = " + attribution.getNetwork()); + trace("Creative = " + attribution.getCreative()); + trace("Adgroup = " + attribution.getAdgroup()); + trace("Click label = " + attribution.getClickLabel()); + trace("Cost type = " + attribution.getCostType()); + trace("Cost amount = " + isNaN(attribution.getCostAmount()) ? "NaN" : attribution.getCostAmount().toString()); + trace("Cost currency = " + attribution.getCostCurrency()); + trace("FB install referrer = " + attribution.getFbInstallReferrer()); +}); +``` + +### Event deduplication {% #event-deduplication %} + +In Adobe AIR SDK v5, event deduplication is decoupled from the event `transactionId`. To prevent measuring duplicated events, use the `deduplicationId` ID field. + +```actionscript-3 +adjustEvent.setDeduplicationId("deduplicationId"); +``` + +### Push tokens {% #push-tokens %} + +In Adobe AIR SDK v5, the `setDeviceToken` method has been renamed to `setPushToken`. + +```actionscript-3 +Adjust.setPushToken("push-token"); +``` + +### Session callback parameters {% #session-callback-parameters %} + +In Adobe AIR SDK v5, the session callback parameters have been renamed to global callback parameters. + +To add global callbacks to your sessions, call the `Adjust.addGlobalCallbackParameter` method with the following arguments: + +{% deflist %} +`key`: `String` + +: The key of your parameter. + +`value`: `String` + +: The value of your parameter. +{% /deflist %} + +Learn how to [set up global callback](/en/sdk/adobe-air/features/global-parameters#session-callback-parameters). + +```actionscript-3 +Adjust.addGlobalCallbackParameter("user_id", "855"); +Adjust.removeGlobalCallbackParameter("user_id"); +Adjust.removeGlobalCallbackParameters(); +``` + +### Session partner parameters {% #session-partner-parameters %} + +In Adobe AIR SDK v5, the session partner parameters have been renamed to global partner parameters. + +To add global partner to your sessions, call the `Adjust.addGlobalPartnerParameter` method with the following arguments: + +{% deflist %} +`key`: `String` + +: The key of your parameter. + +`value`: `String` + +: The value of your parameter. +{% /deflist %} + +Learn how to [set up global partner parameters](/en/sdk/adobe-air/features/global-parameters#session-partner-parameters). + +```actionscript-3 +Adjust.addGlobalPartnerParameter("user_id", "855"); +Adjust.removeGlobalPartnerParameter("user_id"); +Adjust.removeGlobalPartnerParameters(); +``` + +## Session and event callbacks {% #session-event-callbacks %} + +### Session success callbacks {% #session-success %} + +In Adobe AIR SDK v5, the `setSessionTrackingSucceededDelegate` method has been renamed to `setSessionSuccessCallback`. + +The `getTimeStamp()` method has been renamed to `getTimestamp()`. + +To register a successful session recording by the SDK, call the `setSessionSuccessCallback` with any of the following properties: + +```actionscript-3 +adjustConfig.setSessionSuccessCallback(function (sessionSuccess:AdjustSessionSuccess):void { + // All session success properties. + trace("Session tracking succeeded"); + trace("Message = " + sessionSuccess.getMessage()); + trace("Timestamp = " + sessionSuccess.getTimestamp()); + trace("Adid = " + sessionSuccess.getAdid()); + trace("Json Response = " + sessionSuccess.getJsonResponse()); +}); +``` + +### Session failure callbacks {% #session-failure %} + +In Adobe AIR SDK v5, the `setSessionTrackingFailedDelegate` method has been renamed to `setSessionFailureCallback`. + +The `getTimeStamp()` method has been renamed to `getTimestamp()`. + +To register a failed session recording by the SDK, call the `setSessionFailureCallback` with any of the following properties: + +```actionscript-3 +adjustConfig.setSessionFailureCallback(function (sessionFailure:AdjustSessionFailure):void { + // All session failure properties. + trace("Session tracking failed"); + trace("Message = " + sessionFailure.getMessage()); + trace("Timestamp = " + sessionFailure.getTimestamp()); + trace("Adid = " + sessionFailure.getAdid()); + trace("Will Retry = " + sessionFailure.getWillRetry().toString()); + trace("Json Response = " + sessionFailure.getJsonResponse()); +}); +``` + +### Event success callbacks {% #event-success %} + +In Adobe AIR SDK v5, the `setEventTrackingSucceededDelegate` method has been renamed to `setEventSuccessCallback`. + +The `getTimeStamp()` method has been renamed to `getTimestamp()`. + +To register a successful event recording by the SDK, call the `setEventSuccessCallback` with any of the following properties: + +```actionscript-3 +adjustConfig.setEventSuccessCallback(function (eventSuccess:AdjustEventSuccess):void { + // All event success properties. +trace("Event tracking succeeded"); +trace("Message = " + eventSuccess.getMessage()); +trace("Timestamp = " + eventSuccess.getTimestamp()); +trace("Adid = " + eventSuccess.getAdid()); +trace("Event Token = " + eventSuccess.getEventToken()); +trace("Callback Id = " + eventSuccess.getCallbackId()); +trace("Json Response = " + eventSuccess.getJsonResponse()); +}); +``` + +### Event failure callbacks {% #event-failure %} + +In Adobe AIR SDK v5, the `setEventTrackingFailedDelegate` method has been renamed to `setEventFailureCallback`. + +The `getTimeStamp()` method has been renamed to `getTimestamp()`. + +To register a failed event recording by the SDK, call the `setEventFailureCallback` with any of the following properties: + +```actionscript-3 +adjustConfig.setEventFailureCallback(function (eventFailure:AdjustEventFailure):void { + // All event failure properties. + trace("Event tracking failed"); + trace("Message = " + eventFailure.getMessage()); + trace("Timestamp = " + eventFailure.getTimestamp()); + trace("Adid = " + eventFailure.getAdid()); + trace("Event Token = " + eventFailure.getEventToken()); + trace("Callback Id = " + eventFailure.getCallbackId()); + trace("Will Retry = " + eventFailure.getWillRetry().toString()); + trace("Json Response = " + eventFailure.getJsonResponse()); +}); +``` + +## Deep links {% #deep-links %} + +### Reattribution using direct deep links {% #reattribution-using-deep-links %} + +In Adobe AIR SDK v5, the `appWillOpenUrl` method has been renamed to `processDeeplink`. + +To process a direct deep link, create a new `AdjustDeeplink` instance with the deep link URL, and pass it to the `Adjust.processDeeplink` method. + +```actionscript-3 +var app:NativeApplication = NativeApplication.nativeApplication; +app.addEventListener(InvokeEvent.INVOKE, onInvoke); + +// ... + +private static function onInvoke(event:InvokeEvent):void { + if (event.arguments.length == 0) { + return; + } + + var deeplink:String = event.arguments[0]; + trace("Deeplink = " + deeplink); + var adjustDeeplink:AdjustDeeplink = new AdjustDeeplink(deeplink); + Adjust.processDeeplink(adjustDeeplink); +} +``` + +Learn how to [reattribute users with direct deep links](/en/sdk/adobe-air/features/deep-links#reattribution-with-deep-links). + +### Disable opening deferred deep links {% #launch-deferred-deep-links %} + +In Adobe AIR SDK v5, the `setShouldLaunchDeeplink` method has been renamed to `disableDeferredDeeplinkOpening`. Opening deferred deep links is enabled by default. + +To disable opening deferred deep links, call the renamed method: + +```actionscript-3 +adjustConfig.disableDeferredDeeplinkOpening(); +``` + +### Deferred deep link callback listener {% #deffered-deep-link-callback-listener %} + +In Adobe AIR SDK v5, the `setDeferredDeeplinkDelegate` method has been renamed to `setDeferredDeeplinkCallback`. + +To set a deferred deep link callback, call the `setDeferredDeeplinkCallback` method on your `AdjustConfig` instance: + +```actionscript-3 +adjustConfig.setDeferredDeeplinkCallback(function (deeplink:String):void { + trace("Received deferred deep link"); + trace("Deep link = " + deeplink); +}); +``` + +Learn how to [work with deferred deep link callbacks](/en/sdk/adobe-air/features/deep-links#deffered-deep-link-callbacks). + +## iOS only APIs {% #ios-only-apis %} + +### SKAdNetwork handling {% #skadnetwork-handling %} + +In Adobe AIR SDK v5, the `deactivateSKAdNetworkHandling` method has been renamed to `disableSkanAttribution`. The `SKAdNetwork` API is enabled by default. + +To disable the SKAdNetwork communication, call the `disableSkanAttribution` method on your `adjustConfig` instance. + +```actionscript-3 +adjustConfig.disableSkanAttribution(); +``` + +### App Tracking Transparency authorization wrapper {% #att-wrapper %} + +In Adobe AIR SDK v5, the `requestTrackingAuthorizationWithCompletionHandler` method has been renamed to `requestAppTrackingAuthorization` for clarity. + +The renamed method is invoked like so: + +```actionscript-3 +Adjust.requestAppTrackingAuthorization(function (status:String):void { + trace("Status = " + status); +}); +``` + +## Get device information {% #device-info %} + +In Adobe AIR SDK v4, all device information getter methods run synchronously. + +In SDK v5, the following methods have been changed to run asynchronously. + +### Adjust ID + +{% codeblock title="Adjust ID getter" %} +```actionscript-3 +Adjust.getAdid(function (adid:String):void { + trace("Adjust ID = " + adid); +}); +``` +{% /codeblock %} + +### Amazon Advertising ID + +{% codeblock title="Amazon ADID getter" %} +```actionscript-3 +Adjust.getAmazonAdId(function (amazonAdId:String):void { + trace("Amazon Advertising ID = " + amazonAdId); +}); +``` +{% /codeblock %} + +### Apple's Identifier for Advertisers (IDFA) + +{% codeblock title="IDFA getter" %} +```actionscript-3 +Adjust.getIdfa(function (idfa:String):void { + trace("IDFA = " + idfa); +}); +``` +{% /codeblock %} + +## Get attribution information {% #attribution-info %} + +In Adobe AIR SDK v4, the attribution information getter methods run synchronously. + +In SDK v5, the following methods have been changed to run asynchronously. + +### Attribution + +{% codeblock title="Attribution getter" %} +```actionscript-3 +Adjust.getAttribution(function (attribution:AdjustAttribution):void { + trace("Tracker token = " + attribution.getTrackerToken()); + trace("Tracker name = " + attribution.getTrackerName()); + trace("Campaign = " + attribution.getCampaign()); + trace("Network = " + attribution.getNetwork()); + trace("Creative = " + attribution.getCreative()); + trace("Adgroup = " + attribution.getAdgroup()); + trace("Click label = " + attribution.getClickLabel()); + trace("Cost type = " + attribution.getCostType()); + trace("Cost amount = " + isNaN(attribution.getCostAmount()) ? "NaN" : attribution.getCostAmount().toString()); + trace("Cost currency = " + attribution.getCostCurrency()); + trace("FB install referrer = " + attribution.getFbInstallReferrer()); +}); +``` +{% /codeblock %} + +## Removed APIs {% #removed-apis %} + +{% minorversion removed="v5" size="large" /%} + +The following APIs have been removed from Adobe AIR SDK v5. + +- The `setDelayStart` method has been removed. +- The `setEventBufferingEnabled` method has been removed. +- The `setReadMobileEquipmentIdentity` method has been removed. (**non-Google Play Store Android apps only**) + +### Disable third party sharing globally {% #disable-sharing-globally %} + +The `disableThirdPartySharing` method has been removed. + +To enable or disable all third-party sharing in Adobe AIR SDK v5, use the `trackThirdPartySharing` method. + +```actionscript-3 +var adjustThirdPartySharing:AdjustThirdPartySharing = new AdjustThirdPartySharing("false"); +Adjust.trackThirdPartySharing(adjustThirdPartySharing); +``` + +### Set an app secret {% #set-app-secret %} + +The `setAppSecret` method has been removed. + +The [SDK signature library](https://help.adjust.com/en/article/sdk-signature) is bundled in Adjust SDKs v5 and enabled by default. To configure the anti-spoofing solution in the Adjust Dashboard, follow [the integration guide](https://help.adjust.com/en/article/sdk-signature#get-started) for your platform. + +### Huawei referrer API + +This feature has been removed. If your Adobe AIR app uses the Huawei referrer API, contact your Adjust representative or email [support@adjust.com](mailto:support@adjust.com) before you upgrade.