SendsayPlatform class abstract
Handles communication with the platform.
- Inheritance
-
- Object
- PlatformInterface
- SendsayPlatform
Constructors
- SendsayPlatform()
- Constructs a SendsayPlatform.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
openedPushStream
→ Stream<
OpenedPush> -
A stream of opened push notifications.
The SDK will hold last data until you set the listener.
Don't forget to call cancel on the subscription when no longer listening.
no setter
-
receivedPushStream
→ Stream<
ReceivedPush> -
A stream of received push notifications.
Called for both regular and silent push notifications on Android, and silent notifications only on iOS.
The SDK will hold last data until you set the listener.
Don't forget to call cancel on the subscription when no longer listening.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
anonymize(
[SendsayConfigurationChange configurationChange = const SendsayConfigurationChange()]) → Future< void> - Anonymize current customer and create a new one. Push token is cleared on Sendsay backend. Optionally changes default Sendsay project and event-project mapping.
-
checkPushSetup(
) → Future< void> - Enable automatic push notification diagnostics before configuring the SDK to help you with push notification integration.
-
clearLocalCustomerData(
{String? appGroup}) → Future< void> - Clears local data from a previous integration while the SDK is inactive.
-
configure(
SendsayConfiguration configuration) → Future< bool> - Configure Sendsay SDK. Should only be called once. You need to configure SendsaySDK before calling most methods. Returns true if configuration was successful. Returns false if sdk was already configured.
-
fetchAppInbox(
) → Future< List< AppInboxMessage> > - Fetches AppInbox for the current customer
-
fetchAppInboxItem(
String messageId) → Future< AppInboxMessage> - Fetches AppInbox message by ID for the current customer
-
fetchConsents(
) → Future< List< Consent> > - Fetch consents for the current customer.
-
fetchGAID(
) → Future< String?> - Requests a Google advertising ID without populating the SDK's cache.
-
fetchIDFA(
) → Future< String?> - Requests the advertising ID through the iOS SDK, including ATT permission.
-
fetchRecommendations(
RecommendationOptions options) → Future< List< Recommendation> > - Fetch recommendations based on RecommendationOptions.
-
flushData(
) → Future< void> - Flush data to Sendsay backend. Only usable in FlushMode.manual.
-
getCustomerCookie(
) → Future< String> - Get cookie of the current customer.
-
getDefaultProperties(
) → Future< Map< String, dynamic> > - Get default properties tracked with every event
-
getFlushMode(
) → Future< FlushMode> - Get current FlushMode used by the SDK.
-
getFlushPeriod(
) → Future< Duration> - Get the period with which events are tracked to Sendsay backend. Only valid in FlushMode.period.
-
getGAID(
) → Future< String?> - Returns the Android SDK's cached Google advertising ID, if available.
-
getIDFA(
) → Future< String?> - Returns the iOS SDK's cached advertising ID without requesting permission.
-
getLogLevel(
) → Future< LogLevel> - Get current LogLevel native SDK uses.
-
getSegments(
String exposingCategory, {bool force = false}) → Future< List< Map< >String, String> > - Returns segments for the exposing category
-
handleCampaignClick(
String url) → Future< void> - Handle Campaign click
-
handleHmsPushToken(
String token) → Future< void> - Handle HMS push token on Android, including before SDK configuration.
-
handlePushNotificationOpened(
Map< String, dynamic> data) → Future<void> - Handle push notification Opened
-
handlePushNotificationOpenedWithoutTrackingConsent(
Map< String, dynamic> data) → Future<void> - Handle push notification Opened
-
handlePushToken(
String token) → Future< void> - Handle FCM/APNS push token. Android can persist the token before SDK configuration.
-
handleRsmPushToken(
String token) → Future< void> - Handles a new RuStore token using the Android SDK's tracking policy.
-
identifyCustomer(
Customer customer) → Future< void> - Identify current customer with new customer ids and properties.
-
inAppMessageActionStream(
{bool overrideDefaultBehavior = false, bool trackActions = true}) → Stream< InAppMessageAction> - A stream of In-app message actions. The SDK will hold last data until you set the listener. Don't forget to call cancel on the subscription when no longer listening. If overrideDefaultBehavior is set to true, default in-app action will not be performed ( e.g. deep link ) If trackActions is set to false, click and close in-app events will not be tracked automatically
-
isConfigured(
) → Future< bool> - Check whether Sendsay SDK is configured.
-
isSendsayNotification(
Map< String, String> data) → Future<bool> - Checks if push notifications originate from sendsay
-
markAppInboxAsRead(
AppInboxMessage message) → Future< bool> - Marks AppInbox message as read
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestIosPushAuthorization(
) → Future< bool> - Request push authorization on iOS.
-
requestPushAuthorization(
) → Future< bool> - Request push authorization on Android or iOS.
-
segmentationDataStream(
String exposingCategory, {bool includeFirstLoad = false}) → Future< Stream< List< >Map< >String, String> > - Returns stream segments for the exposing category
-
setAppInboxProvider(
AppInboxStyle style) → Future< void> - Set AppInboxProvider
-
setDefaultProperties(
Map< String, dynamic> properties) → Future<void> - Set default properties tracked with every event. Only use for reconfiguration, preferred way of setting default properties is configuration object.
-
setFlushMode(
FlushMode mode) → Future< void> - Set the Flush mode used by the SDK.
-
setFlushPeriod(
Duration period) → Future< void> - Set the period with which events are tracked to Sendsay backend. Only valid in FlushMode.period.
-
setLogLevel(
LogLevel level) → Future< void> - Set LogLevel for native SDK.
-
stopIntegration(
) → Future< void> - Stops a configured native SDK and clears its local integration data.
-
toString(
) → String -
A string representation of this object.
inherited
-
trackAppInboxClick(
AppInboxAction action, AppInboxMessage message) → Future< void> - Track AppInbox message click event Event is tracked if one or both conditions met: - parameter 'message' has TRUE value of 'hasTrackingConsent' property - parameter 'buttonLink' has TRUE value of query parameter 'xnpe_force_track'
-
trackAppInboxClickWithoutTrackingConsent(
AppInboxAction action, AppInboxMessage message) → Future< void> - Track AppInbox message click event
-
trackAppInboxOpened(
AppInboxMessage message) → Future< void> - Track AppInbox message detail opened event Event is tracked if parameter 'message' has TRUE value of 'hasTrackingConsent' property
-
trackAppInboxOpenedWithoutTrackingConsent(
AppInboxMessage message) → Future< void> - Track AppInbox message detail opened event
-
trackClickedPush(
Map< String, dynamic> data) → Future<void> - Track clicked push notification
-
trackClickedPushWithoutTrackingConsent(
Map< String, dynamic> data) → Future<void> - Track clicked push notification
-
trackDeliveredPush(
Map< String, dynamic> data) → Future<void> - Track delivered push notification
-
trackDeliveredPushWithoutTrackingConsent(
Map< String, dynamic> data) → Future<void> - Track delivered push notification
-
trackEvent(
Event event) → Future< void> - Track custom event to Sendsay backend.
-
trackGAID(
) → Future< void> - Starts the Android SDK's advertising ID collection and caching operation.
-
trackHmsPushToken(
String token) → Future< void> - Track HMS push token Only for Android
-
trackIDFA(
) → Future< void> - Starts the iOS SDK's advertising ID collection and caching operation.
-
trackInAppContentBlockClick(
String placeholderId, InAppContentBlock contentBlock, InAppContentBlockAction action) → Future< void> - Track in-app content block click event
-
trackInAppContentBlockClickWithoutTrackingConsent(
String placeholderId, InAppContentBlock contentBlock, InAppContentBlockAction action) → Future< void> - Track in-app content block click event
-
trackInAppContentBlockClose(
String placeholderId, InAppContentBlock contentBlock) → Future< void> - Track in-app content block close event
-
trackInAppContentBlockCloseWithoutTrackingConsent(
String placeholderId, InAppContentBlock contentBlock) → Future< void> - Track in-app content block close event
-
trackInAppContentBlockError(
String placeholderId, InAppContentBlock contentBlock, String errorMessage) → Future< void> - Track in-app content block error event
-
trackInAppContentBlockErrorWithoutTrackingConsent(
String placeholderId, InAppContentBlock contentBlock, String errorMessage) → Future< void> - Track in-app content block error event
-
trackInAppContentBlockShown(
String placeholderId, InAppContentBlock contentBlock) → Future< void> - Track in-app content block show event
-
trackInAppContentBlockShownWithoutTrackingConsent(
String placeholderId, InAppContentBlock contentBlock) → Future< void> - Track in-app content block show event
-
trackInAppMessageClick(
InAppMessage message, InAppMessageButton button) → Future< void> - Track in-app message click event
-
trackInAppMessageClickWithoutTrackingConsent(
InAppMessage message, InAppMessageButton button) → Future< void> - Track in-app message click event
-
trackInAppMessageClose(
InAppMessage message, {InAppMessageButton? button, bool interaction = true}) → Future< void> - Track in-app message close event
-
trackInAppMessageCloseWithoutTrackingConsent(
InAppMessage message, {InAppMessageButton? button, bool interaction = true}) → Future< void> - Track in-app message close event
-
trackPaymentEvent(
PurchasedItem purchasedItem, {DateTime? timestamp}) → Future< void> - Track payment event.
-
trackPushToken(
String token) → Future< void> - Track FCM/APNS push token
-
trackRsmPushToken(
String token) → Future< void> - Tracks a RuStore push token on Android on every call.
-
trackSessionEnd(
{DateTime? timestamp}) → Future< void> - Manually track session end. Only usable when SendsayConfiguration.automaticSessionTracking is disabled. NOTE: iOS doesn't support using a specific timestamp.
-
trackSessionStart(
{DateTime? timestamp}) → Future< void> - Manually track session start. Only usable when SendsayConfiguration.automaticSessionTracking is disabled. NOTE: iOS doesn't support using a specific timestamp.
-
trackSSECEvent(
Map< String, dynamic> ssec) → Future<void> - Track SSEC event to Sendsay backend.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ SendsayPlatform
-
The default instance of SendsayPlatform to use.
getter/setter pair