releva_sdk 0.0.58 copy "releva_sdk: ^0.0.58" to clipboard
releva_sdk: ^0.0.58 copied to clipboard

Releva.ai SDK for Flutter apps

0.0.58 #

  • Session timeout fix We consider a session has ended after 30 mintues of inactivity (industry standard as of 2026)
  • Bar banner fix in top position The close button is now positioned properly to prevent a few pixels clipped at the top

0.0.57 #

  • Banner close button color fix Fixed banner close button not respecting color settings.

0.0.56 #

  • Lifecycle-based session tracking. Sessions are now counted based on app lifecycle events (foreground/background transitions with >30s threshold) instead of push-call timing gaps. Each new session generates a fresh sessionId, replacing the old separate 24h expiry timer. This makes device.sessions accurately reflect "how many times the user opened the app."
  • Fix banner text color ignoring content-level color property. Text and heading elements in banner designs now correctly read the Unlayer color field, with fallback to textColor then body default. Previously only textColor was checked, causing content with explicit color (e.g. white text on dark background) to render in the body default color (black).

0.0.55 #

  • Story viewer: interactive slide elements now work alongside navigation. Buttons, linked images, carousels, and menus inside story slides can now be tapped and swiped without triggering slide navigation. Navigation uses HitTestBehavior.translucent so taps on non-interactive areas (text, backgrounds, empty space) still navigate between slides. Previously, the story viewer intercepted all gestures, making in-slide elements non-interactive.
  • RelevaNotificationAction.toString() added for easier debugging of push notification payloads.
  • NavigationService stripped down to a navigatorKey holder. The opinionated navigation methods (handleNotificationNavigation, _navigateToRoute, goToHome, getCurrentRouteName) have been removed. Apps already handle navigation via the onNotificationTapped callback (required since v0.0.53), so these methods were unused dead code. NavigationService.instance.navigatorKey remains available as an optional convenience.
  • url_launcher removed from SDK dependencies. It was only used by the removed navigation methods. Apps that use url_launcher in their onNotificationTapped callback already declare it as their own dependency.
  • README: added onLinkTap to BannerDisplayWidget example and removed hardcoded screenToken.

0.0.54 #

  • Inbox navigation from push notifications. NavigationService now handles target: "inbox" natively — it looks up the message via InboxService.getMessageById(), marks it as read, and navigates to /inbox with the resolved message ID in parameters. Apps no longer need to implement inbox routing in their onNotificationTapped callback.
  • README improvements. Added onLinkTap callback to the BannerDisplayWidget example. Updated push notification documentation to include inbox as a navigation target alongside screen and url.

0.0.53 #

Breaking changes #

  • enablePushEngagementTracking now requires onNotificationTapped. The old optional callback with NotificationResponse has been replaced with a required callback that receives a RelevaNotificationAction — a structured object with parsed target, screen, url, and parameters fields. The built-in NavigationService auto-navigation has been removed; apps must handle navigation in the callback.

    Before:

    await client.enablePushEngagementTracking();
    // or
    await client.enablePushEngagementTracking(
      onNotificationTapped: (NotificationResponse response) { ... },
    );
    

    After:

    await client.enablePushEngagementTracking(
      onNotificationTapped: (RelevaNotificationAction action) async {
        final navigator = NavigationService.instance.navigatorKey.currentContext;
        if (navigator == null) return;
    
        if (action.target == 'screen' && action.screen != null) {
          Navigator.of(navigator).pushNamedAndRemoveUntil(
            action.screen!, (route) => route.isFirst, arguments: action.parameters);
        } else if (action.target == 'url' && action.url != null) {
          final uri = Uri.tryParse(action.url!);
          if (uri != null) await launchUrl(uri, mode: LaunchMode.externalApplication);
        }
      },
    );
    
  • RelevaClient.isRelevaMessage() now matches all RELEVA_* messages. The check was broadened from an exact RELEVA_NOTIFICATION_CLICK match to a startsWith('RELEVA_') prefix check to support future message types such as RELEVA_INBOX_SYNC. Apps that call isRelevaMessage() to gate UI decisions or navigation should also check message.data['click_action'] == 'RELEVA_NOTIFICATION_CLICK' before acting, to avoid reacting to silent inbox sync pushes.

  • New InboxService.getMessageById(int inboxMessageId) helper. Refreshes the inbox and returns the matching InboxMessage, or null if not found. Use this when handling inbox navigation from push notifications instead of reimplementing the lookup yourself.

    final message = await InboxService.instance.getMessageById(
      int.parse(action.parameters['inboxMessageId']),
    );
    

Other changes #

  • New setEndpointOverride(String? url) method on RelevaClient. Overrides the API endpoint URL at runtime (e.g. for local development with ngrok). Pass null to revert to the default. The override applies to all API calls including inbox.
  • InboxService refactored to use RelevaClient for all HTTP calls. InboxService no longer manages its own HTTP client, access token, realm, or endpoint override. It delegates all networking to RelevaClient via the InboxApiClient interface. InboxService.initialize() now takes a {required InboxApiClient client} parameter instead of individual fields.
  • Releva messages identified by click_action prefix. isRelevaMessage() now checks click_action.startsWith('RELEVA_') instead of exact match on RELEVA_NOTIFICATION_CLICK. Standalone silent inbox sync pushes use click_action: 'RELEVA_INBOX_SYNC' and are handled without displaying a notification. Backward compatible with older SDKs.
  • No Android manifest configuration required. The RELEVA_NOTIFICATION_CLICK intent filter is no longer needed since the SDK uses data-only FCM messages handled via local notifications.
  • Inbox sync signal is now piggybacked on the visible push notification instead of being sent as a separate silent FCM message. No app-side changes needed.
  • Inbox sync signal key changed from magellan_notification_type: "inbox_sync" to inbox_sync: "true", scoped inside the Releva message check to avoid conflicts with other SDKs.

0.0.52 #

  • Banner rendering & click/close signal improvements

0.0.51 #

  • Fix duplicate push notification click tracking on cold start caused by handling the launch notification in both onDidReceiveNotificationResponse and getNotificationAppLaunchDetails

0.0.50 #

  • Add NPS Support

0.0.49 #

  • Remove harcoded Colors.blue.shade50 from banner_display_widget background

0.0.48 #

  • Add stories support

0.0.47 #

  • Add app inbox support

0.0.46 #

  • Remove all harcoded paddinngs from banner display widget

0.0.45 #

  • Use unlayer's design json to render bannners using native components

0.0.44 #

  • Correctly handle DateTime conversion to ISO-8601 for custom fields.

0.0.43 #

  • Bump http to ^1.0.0

0.0.42 #

  • Remove ngrok endpoints that were added by mistake in the last version

0.0.41 #

  • Update other files in github related to version in github

0.0.40 #

  • Updated README.md file

0.0.39 #

  • Added a second parameter to setProfileId() function, it is called skipMergeWithPreviousProfileId and it is used with true when a user logs out of their profile.
  • Fixed edge cases when profiles were not merging
  • Fixed type bug in ProductRecommendation

0.0.38 #

  • Fix not calling callback
  • Added NotificationResponse parameter to onNotificationTapped callback to provide access to raw Android notification data when handling multiple notification actions

0.0.37 #

  • NEW: Add onNotificationTapped callback parameter to enablePushEngagementTracking()
  • FEATURE: Custom notification tap callback for handling navigation and custom actions
  • BEHAVIOR CHANGE: When callback is provided, SDK skips automatic navigation (user handles it)
  • BEHAVIOR: When callback is NOT provided, SDK handles navigation automatically (backward compatible)
  • Engagement tracking always happens regardless of callback presence

0.0.36 #

  • Support both data-only push payloads (next) and data+notification payloads (current as of Oct 15 2025)

0.0.35 #

  • Add banner impression event when banner is visible

0.0.34 #

  • Downgrade flutter_widget_from_html version to be compatible with carsome app

0.0.33 #

  • add pushRequest.search('query') support

0.0.32 #

  • Support banners
  • Clean up unused functionality

0.0.31 #

  • Add client.isRelevaMessage method

0.0.30 #

  • Fix, previous version does not comform to spec

0.0.29 #

  • Method for handling engagement tracking in your app's hooks

0.0.27 #

  • Refactor and release next iteration

0.0.26 #

  • NEW: Inbox messages with structured data and native Flutter widgets
  • NEW: Character limit validation (Title: 45, Short Description: 40, Description: 350, CTA: 10 chars)
  • NEW: InboxMessageWidget for native message display (no HTML rendering)
  • NEW: Automatic message type detection with isInboxMessage property
  • UPDATED: InAppMessage model with shortDescription, description, and cta fields
  • UPDATED: MessageDisplayManager to handle inbox messages
  • UPDATED: Hive type adapters for new message fields
  • TESTS: Added comprehensive inbox message tests with character validation
  • NEW: Support push notification app links

0.0.14 #

  • Use builder pattern for request

0.0.13 #

  • Remove deviceId from constructor (different strategies in the future)

0.0.12 #

  • Fix custom field serialization

0.0.11 #

  • Fix empty events list edge case

0.0.10 #

  • Fix serialization of wishlist products list

0.0.9 #

  • Fix serialization of CustomEvent list

0.0.8 #

  • Fix serualization of WishlistProduct

0.0.7 #

  • Split client API into .screenView and customEvents

0.0.6 #

  • Fix custom field encoding

0.0.5 #

  • Add proper context and options objects

0.0.4 #

  • Print response body

0.0.3 #

  • Fix serualization of CartProduct

0.0.2 #

  • Fix types

0.0.1 #

  • Initial release.