### Get Context from NotificationReceivedEvent Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Makes the `context` getter public for `NotificationReceivedEvent` within `NotificationServiceExtension`. ```java NotificationReceivedEvent ``` -------------------------------- ### Get Subscription Attribute in AppBanner Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Provides support for `getSubscriptionAttribute` within an AppBanner's HTML block. ```java getSubscriptionAttribute ``` -------------------------------- ### Initialize and Load AMP Story Player Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/cleverpush/src/main/assets/story_detail_template.html Initializes the AMP Story player with provided story URLs and loads the player. Handles story navigation and player readiness events. ```javascript loadAmpResources(function() { var playerEl = document.createElement('amp-story-player'); var storyURLs = {{storyURLs}}; storyURLs.forEach(function(storyURL) { var anker = document.createElement('a'); anker.setAttribute('href', storyURL); playerEl.appendChild(anker); }); var player = new AmpStoryPlayer(window, playerEl); document.body.appendChild(playerEl); player.load(); window.player = player; player.addEventListener('noNextStory', function(event) { storyDetailJavascriptInterface.noNext(); }); playerEl.addEventListener('storyNavigation', function(event) { var subStoryIndex = Number(event.detail.pageId?.split('-')?.\\\[1\\\\] || 0); storyDetailJavascriptInterface.storyNavigation({{selectedPosition}}, subStoryIndex); }); function onPlayerReady() { console.log('onStoryReady Player is ready!'); player.go({{selectedPosition}}); } if (player.isReady) { onPlayerReady(); } else { player.addEventListener('ready', function(event) { onPlayerReady(); }); } playerEl.addEventListener('navigation', function(event) { storyDetailJavascriptInterface.navigation(event.detail.index); }); }); ``` -------------------------------- ### Open App Settings from ChatView Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md When notification permission is denied, clicking 'Enable Chat Now' in `ChatView` redirects users to App Settings. ```java ChatView ``` -------------------------------- ### Show App Banner with Listener Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Creates a new method to show an App Banner and provides a listener for when the banner is closed. ```java showAppBanner(AppBannerClosedListener) ``` -------------------------------- ### Load AMP Resources Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/cleverpush/src/main/assets/story_detail_template.html Loads the AMP Story player script and stylesheet. Ensures the script is loaded only once. ```javascript function loadAmpResources(callback) { if (window.ampStoryPlayerLoaded) { if (typeof callback === 'function') { callback(); } return; } window.ampStoryPlayerLoaded = true; const script = document.createElement('script'); const link = document.createElement('link'); script.src = 'https://cdn.ampproject.org/amp-story-player-v0.js'; script.async = true; script.onload = callback; link.href = 'https://cdn.ampproject.org/amp-story-player-v0.css'; link.rel = 'stylesheet'; link.type = 'text/css'; document.head.append(script, link); } ``` -------------------------------- ### Track Confirm-Alert Statistics on Denied Permissions Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Ensures that confirm-alert statistics are tracked even when notification permissions are denied. ```java confirm-alert ``` -------------------------------- ### StoryView Customization Options Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Adds more customization options for `StoryView`, including text sizes and badge dimensions for sub-stories. ```java title_max_text_size ``` ```java title_min_text_size ``` ```java sub_story_unread_count_badge_height ``` ```java sub_story_unread_count_badge_width ``` -------------------------------- ### StoryView Grouping Support Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Optimizes `StoryView` and adds support for grouping stories. ```java StoryView ``` -------------------------------- ### Handle Window Message Events for Story Content Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/cleverpush/src/main/assets/story_detail_template.html Listens for messages from the window to detect when story content is loaded and to handle story button callbacks. ```javascript window.addEventListener('message', function(event) { try { if (typeof event.data === 'object') { if (event.data.name === 'storyContentLoaded') { storyDetailJavascriptInterface.ready(); } } else { var data = JSON.parse(event.data); if (data.type === 'storyButtonCallback') { window.storyDetailJavascriptInterface.storyButtonCallbackUrl(JSON.stringify(data)); } } } catch (ignored) {} }); ``` -------------------------------- ### Handle Link by System for HTML AppBanners Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Use this method in HTML banners to compose emails directly using the native Mail app. ```javascript CleverPush.handleLinkBySystem('mailto:example@email.com'); ``` -------------------------------- ### StoryView Loading Animation Dark Mode Optimization Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Optimizes loading animation for `StoryView` in dark mode, specifically for `border_color_loading` and `border_color_loading_dark_mode`. ```java border_color_loading ``` ```java border_color_loading_dark_mode ``` -------------------------------- ### Migrate Edge-to-Edge Display APIs Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Migrates deprecated edge-to-edge display APIs for compatibility with Android 15. ```java Migrated deprecated edge-to-edge display APIs for Android 15 ``` -------------------------------- ### Track Story Opened Statistics Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Optimizes the tracking of statistics for when a story is opened in `StoryView`. ```java trackStoryOpened ``` -------------------------------- ### AppBanner Multiple Display Fix Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Fixed a potential bug in `AppBanner for Push Notification` where the banner sometimes displayed multiple times. ```java AppBanner for Push Notification ``` -------------------------------- ### Set Multiple Subscription Attributes Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Introduces the `setSubscriptionAttributes` method for efficiently setting multiple key-value pairs in a single request. ```java setSubscriptionAttributes ``` -------------------------------- ### Copy to Clipboard in HTML Banners Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Adds the `copyToClipboard` method to HTML app banners, enabling functionality to copy text to the clipboard. ```java copyToClipboard ``` -------------------------------- ### Track Story Shown Statistics Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Optimizes the tracking of statistics for when a story is shown in `StoryView`. ```java trackStoryShown ``` -------------------------------- ### AppBanner Frequency Setting Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Adds a feature to `AppBanner` to set the frequency for displaying the banner every X days. ```java AppBanner ``` -------------------------------- ### Enable Custom Notification Activity Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Allows launching a custom activity when a notification is opened by setting `setCustomNotificationActivityEnabled(true)` within the `notificationOpenedCallback`. ```java setCustomNotificationActivityEnabled(true) ``` -------------------------------- ### Set Opened Listener for StoryView Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Fixes an issue where stories could not be opened when implementing `setOpenedListener` in `StoryView`. ```java setOpenedListener ``` -------------------------------- ### Set Custom Notification Sound Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Allows setting a custom notification sound through the `notification category` for push notifications. ```java notification category ``` -------------------------------- ### Synchronized Subscription Methods Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Ensures thread-safe operations and consistent updates for `setSubscriptionAttribute`, `addSubscriptionTag/Tags`, and `removeSubscriptionTag/Tags`. ```java setSubscriptionAttribute ``` ```java addSubscriptionTag/Tags ``` ```java removeSubscriptionTag/Tags ``` -------------------------------- ### Track Notification Clicks Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Enables tracking of notification clicks within the Notification class. ```java trackInboxClicked() ``` -------------------------------- ### StoryView Dark Mode UI Customization Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Provides additional options for customizing the dark mode UI in `StoryView`, including colors for borders, backgrounds, and text. ```java border_color_dark_mode ``` ```java background_color_dark_mode ``` ```java text_color_dark_mode ``` ```java sub_story_unread_count_background_color_dark_mode ``` ```java sub_story_unread_count_text_color_dark_mode ``` -------------------------------- ### Set App Banner Closed Listener Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Implements a listener for the `showAppBanner` method to be notified when an app banner is closed. ```java setAppBannerClosedListener() ``` -------------------------------- ### Remove Notification with System Center Option Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Adds an optional parameter to remove notifications from the system notification center as well. ```java removeNotification(removeFromNotificationCenter: true) ``` -------------------------------- ### StoryView Unread Count Margin Optimization Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Optimizes `StoryView` by removing the margin when `unread_count_visibility` is not set to `visible`. ```java unread_count_visibility ``` -------------------------------- ### Push Notification Crash Fix with AppBanner Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Fixed a potential crash when receiving a push notification while `AppBanner` is active. ```java push notification ``` ```java AppBanner ``` -------------------------------- ### Set Dark Mode for StoryView Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Enables dark mode for `StoryView` by calling `setDarkModeEnabled(boolean)`. The mode will be applied based on system settings. ```java setDarkModeEnabled(boolean) ``` -------------------------------- ### InboxView Custom Font Family Fix Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Resolved a bug in `InboxView` where setting a custom font family caused an error and prevented the inbox view list from displaying. ```java InboxView ``` -------------------------------- ### Set Default Notification Icon Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Configure a default notification icon for push notifications using a meta-data entry in your AndroidManifest.xml. ```xml ``` -------------------------------- ### Set Custom Notification Color Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Define a custom color for push notifications by adding a meta-data entry to your AndroidManifest.xml. ```xml ``` -------------------------------- ### AppBanner Target Attribute Array Type Fix Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Resolved a crash issue in `AppBanner` when targeting an attribute whose value is an array type during `pushSubscriptionAttributeValue` or `setSubscriptionAttribute` operations. ```java pushSubscriptionAttributeValue ``` ```java setSubscriptionAttribute ``` -------------------------------- ### Firebase Messaging Version 24 Support Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Added support for Firebase Messaging Version 24. ```java Firebase Messing Version 24 ``` -------------------------------- ### Set Notification Read Status Source: https://github.com/cleverpush/cleverpush-android-sdk/blob/master/CHANGELOG.md Optimizes the handling of notifications marked as read or unread. Persists updates in local storage and reflects them in the InboxView. ```java setRead() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.