HackleDelegate class abstract

Receives links from push notifications and in-app messages.

When a delegate is registered, the SDK does not open links itself; handleUrl is called instead and the app decides what to do with the link.

To receive the link of a push notification that launched the app from a terminated state (cold start), register the delegate with HackleConfigBuilder.delegate instead of setDelegate, and enable the defer setting in the app:

  • iOS Info.plist: HackleDeferPushLinkUntilInitialized (Boolean YES; a String value is ignored)
  • Android manifest: <meta-data android:name="io.hackle.android.defer_push_link_until_initialized" android:value="true" />

It is recommended not to pass a delegate from a background isolate (for example the background handler of firebase_messaging). On Android, a delegate passed from an engine that is not attached to an Activity does not take over link delivery; on iOS it should not be passed at all.

Constructors

HackleDelegate()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

handleUrl(HackleUrlContext context) → void
Called when a link from a push notification or in-app message is received.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited