Package 

Class SendLaunchTask

  • All Implemented Interfaces:
    java.util.concurrent.Callable , kotlin.Comparable

    
    public class SendLaunchTask
    extends SendEventTask
                        

    Sends Launch / Conversion / Attr events to the AppsFlyer backend. This is the main task that produces the install and session payloads used for attribution.

    When launchCounter == 1 the event is sent as CONVERSION. The payload includes DDL metrics, first-launch metrics, marketing referrers (Google Play, Meta, Huawei, …), Facebook DDL, and Branch LATD data.

    When launchCounter == 2 the event is the second app open after install — it can be either a Launch or an Attr. Three things happen at this counter: any non-Google referrer still in STARTED state adds a TIMEOUT entry to RFRS, the first-launch metrics are cleared from the collector (and added to the payload if non-empty), and — for Attr events only — Branch LATD data is added if it was not already included in CONVERSION.

    Soft dependencies on AppsFlyerTaskType.RESOLVE_ESP and AppsFlyerTaskType.DLSDK make this task wait for those tasks when they are running, so they can add resolved deeplink parameters to the event before it is sent.

    At launchCounter == 1 the referrers manager is marked as "conversion prepared" before the referrer list is iterated (DELIVERY-117883). Any referrer callback that finishes after this mark will produce a separate ATTR event instead of being added to the CONVERSION that is currently being sent.

    shouldRetry extends the parent rules: CONVERSION/ATTR events with a 5xx response are retried so a temporary backend error does not lose attribution data. On completion the task ends launch-request metrics collection and, on success only, records sessionStorage.lastSuccessfulLaunchTimestamp.

    If a conversion listener is registered, a GCD (Get Conversion Data) request is then sent. Once on success and once after the first failure, never on subsequent failures so the customer's listener receives onConversionData* even when there is no internet (RD-87373).