handleIntent static method

Future<void> handleIntent()

Hands the host Activity's current intent to the SDK for attribution.

Android only — a no-op on iOS, which has no intent concept.

You rarely need to call this. The plugin forwards the launch intent during initialize and registers a NewIntentListener for every intent that arrives afterwards, so deep links and notification taps are attributed automatically. No MainActivity override is required in the host app.

It is safe to call at any time: the native SDK de-duplicates intents it has already seen, and ignores a plain launcher tap (ACTION_MAIN + CATEGORY_LAUNCHER with no extras and no data) rather than attributing it. An ACTION_VIEW intent produces a DeepLinkClick; any other intent carrying campaign data produces a NotificationClick.

Implementation

static Future<void> handleIntent() {
  assert(() {
    if (!kIsWeb && defaultTargetPlatform == TargetPlatform.iOS) {
      debugPrint(
        'BooleanMaths: handleIntent() does nothing on iOS — the native iOS '
        'SDK has no intent concept and reports no attribution data.',
      );
    }
    return true;
  }());
  return BooleanMathsFlutterSdkPlatform.instance.handleIntent();
}