logo
ドキュメント
検索

How to Reach Users Who Have Disabled Push Notifications

How to Reach Users Who Have Disabled Push Notifications

In modern app development, ensuring that users can still receive important messages even when push notifications are turned off has become a key factor in improving user experience and maintaining user engagement. EngageLab’s message enhancement feature solves this problem by transforming push notifications into in-app messages, ensuring that users don’t miss important information even when they have disabled notifications. This feature is particularly useful in scenarios where users have disabled notification settings, improving message delivery rates and increasing user engagement.

This document will explore how to implement EngageLab’s message enhancement feature in your app and provide best practices to help you efficiently use this feature to enhance user experience.

What is Message Enhancement Reminder?

The message enhancement reminder feature transforms push notifications into in-app messages, solving the issue of delivering information when users have disabled push notifications. Traditional push notifications require the device’s notification permissions to work. If the user has disabled notifications, messages cannot be delivered, affecting user engagement. EngageLab bypasses this limitation by establishing a long-connection message channel. When the user’s device is in the foreground, messages are automatically converted into in-app messages (such as pop-ups, banners, etc.) displayed to the user.

Implementing Message Enhancement in the App

To implement EngageLab’s message enhancement reminder feature, developers just need to follow these simple steps to configure the SDK:

1. Add SDK Dependency

Add the EngageLab SDK in your Android project’s build.gradle file:

implementation 'com.engagelab:engagelab:5.0.0'
              
              implementation 'com.engagelab:engagelab:5.0.0'

            
このコードブロックはフローティングウィンドウ内に表示されます

2. Enable Message Enhancement Feature

In the EngageLab Web console, go to "Create Push" > "Advanced Settings" and enable the "Message Enhancement Reminder" option. Alternatively, you can enable message enhancement by setting the enhanc_message field to true in the push API:

{ "from": "push", "to": "all", "body": { "platform": "android", "notification": { "android": { "title": "Your order is ready!", "alert": "Your food is on the way." } }, "options": { "enhanc_message": true // Enable message enhancement display } } }
              
              {
    "from": "push",
    "to": "all",
    "body": {
        "platform": "android",
        "notification": {
            "android": {
                "title": "Your order is ready!",
                "alert": "Your food is on the way."
            }
        },
        "options": {
            "enhanc_message": true  // Enable message enhancement display
        }
    }
}

            
このコードブロックはフローティングウィンドウ内に表示されます

3. Handle Enhanced Notification Messages

Create a broadcast callback in your app to receive and display enhanced reminder messages. Here is a Java example code:

import com.engagelab.privates.push.api.InAppMessage; import com.engagelab.privates.common.component.MTCommonReceiver; /** * Developers inherit MTCommonReceiver to get SDK callback methods * <p> * All callbacks are in the main thread */ public class UserReceiver extends MTCommonReceiver { @Override public void onInAppMessageShow(Context context, InAppMessage message) { if (message.isNotification()) { // Display the enhanced reminder message (e.g., Toast or custom pop-up) runOnUiThread(() -> Toast.makeText(context, message.getContent(), Toast.LENGTH_LONG).show()); } } @Override public void onInAppMessageClick(Context context, InAppMessage message) { if (message.isNotification()) { // Handle click on enhanced reminder message (e.g., Toast or custom pop-up) runOnUiThread(() -> Toast.makeText(context, message.getContent(), Toast.LENGTH_LONG).show()); } } }
              
              import com.engagelab.privates.push.api.InAppMessage;
import com.engagelab.privates.common.component.MTCommonReceiver;

/**
 * Developers inherit MTCommonReceiver to get SDK callback methods
 * <p>
 * All callbacks are in the main thread
 */
public class UserReceiver extends MTCommonReceiver {
   @Override
    public void onInAppMessageShow(Context context, InAppMessage message) {
        if (message.isNotification()) {
            // Display the enhanced reminder message (e.g., Toast or custom pop-up)
            runOnUiThread(() -> Toast.makeText(context, message.getContent(),
                Toast.LENGTH_LONG).show());
        }
    }

    @Override
    public void onInAppMessageClick(Context context, InAppMessage message) {
        if (message.isNotification()) {
            // Handle click on enhanced reminder message (e.g., Toast or custom pop-up)
            runOnUiThread(() -> Toast.makeText(context, message.getContent(),
                Toast.LENGTH_LONG).show());
       }    
    }
}

            
このコードブロックはフローティングウィンドウ内に表示されます

4. Test the Enhanced Reminder Message Feature

Use EngageLab’s test mode to verify the display effect of the enhanced messages. The SDK provides independent AppKey and Master Secret for testing, ensuring that developers can test without affecting the production environment. You can switch the environment in the console: alt text

With the above configuration, when users disable notifications, messages like "Your order is ready!" will be displayed as in-app pop-ups, maintaining user engagement. For beginners, this is like adding a backup communication strategy for your app—simple but highly effective. alt text

icon
お問い合わせ