Some Android manufacturers — including Samsung, Xiaomi, Huawei, Oppo, Vivo, and OnePlus — restrict background activity for non-system apps. When users swipe these apps away from the recents list, the OS force-stops the app and blocks push delivery until the user reopens it. See Android Force Stop for the underlying cause. Push delivery from OneSignal succeeds, but the device suppresses the notification. You can detect these devices from your Android app and trigger a OneSignal in-app message that walks the user through enabling the right settings.Documentation Index
Fetch the complete documentation index at: https://documentation.onesignal.com/llms.txt
Use this file to discover all available pages before exploring further.
This pattern applies only to Android apps. iOS and web do not have an equivalent OS-level restriction that requires user remediation.
Prerequisites
- An Android app integrated with the OneSignal SDK V5 or later. See Mobile SDK setup.
- An in-app message you can build in the dashboard. See In-app messages setup.
- Familiarity with in-app triggers and the
addTriggermethod.
Set up the message and trigger
Create the in-app message in the dashboard.
In Messages > In-App > New In-App, build the message you want to show. The body should give users clear, copy-paste-friendly steps to allow background activity on their device.Set the audience to Subscribed Users with platform filter Android. Other audience filters work too, as long as the user is in the audience before a new session starts — otherwise the trigger will not fire. See the in-app trigger requirements.In Trigger, choose Custom trigger and set:
- Key:
device_manufacturer - Operator:
is - Value:
restricted

Detect the device manufacturer in your Android app.
Read
android.os.Build.MANUFACTURER early in your app’s lifecycle — for example in Application.onCreate() or immediately after OneSignal initialization. If the value matches your list of restricted manufacturers, call addTrigger with the same key and value you set in the dashboard.Point users to the correct settings.
Settings paths vary by manufacturer and OS version, so generic instructions break quickly. Two approaches that age well:

- Recommended. Link to the manufacturer’s page on dontkillmyapp.com (for example,
https://dontkillmyapp.com/samsung) from the in-app message CTA. The site has up-to-date, per-OEM walkthroughs in multiple languages. - Advanced. Deep-link to the Android battery optimization screen from your IAM click handler using
Intent.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS. This skips the settings hunt entirely on most devices.
Example message copy for Samsung
Example message copy for Samsung
Your device may not be receiving our notifications. To make sure you stay updated: Settings > Apps > [Your app] > Battery > Allow background activity Settings > Apps > [Your app] > Notifications > Allow notifications and verify all categories are on.

Test on a target device.
- Install a debug build on a Samsung (or other restricted-manufacturer) device.
- Force-close and reopen the app to start a new session.
- Confirm in logcat that
addTriggeris being called with the expected key and value. - Verify the in-app message displays. If it does not, see In-app message troubleshooting.
Detect Samsung notification category restrictions
Samsung One UI 6.1 silently disables notification categories for many apps after install, which suppresses notifications even when the OS otherwise allows them. You can target this case with the same pattern by adding a second trigger and a second in-app message.FAQ
Why isn’t my in-app message firing?
The most common cause is callingaddTrigger after the user is already past the start of their session. In-app messages evaluate triggers when a session begins. Call addTrigger early in your app launch flow — before any user interaction — or instruct the user to relaunch the app.
A second common cause is the user being excluded from the message audience. Confirm the message audience includes the test user’s subscription and platform.
Will the message show on every app launch?
By default, every launch where the trigger matches will fire the message. To limit frequency, configure display frequency on the in-app message (for example, “Show only once”).Does this work on iOS?
No. iOS does not allow third-party apps to be force-stopped by the OS or by user swipe, so the underlying problem does not exist. You do not need to ship this pattern on iOS.Does this work on React Native, Flutter, or Cordova?
Yes. TheaddTrigger API is identical across supported SDKs. To read the device manufacturer, use a platform package such as react-native-device-info (getManufacturer()) or device_info_plus (AndroidDeviceInfo.manufacturer), then call OneSignal.InAppMessages.addTrigger("device_manufacturer", "restricted") when the value matches your list.
Can OneSignal detect the manufacturer for me?
No. The OneSignal SDK does not exposeBuild.MANUFACTURER directly. You read it from the Android Build class in your own code and pass the result to addTrigger.
Where can I see if the trigger is firing?
Trigger state is local to the SDK and is not a user-level property, so it does not appear in the OneSignal dashboard. To confirm it ran, add a log statement next to youraddTrigger call, then watch logcat or check whether the IAM displayed for the test user.
Related pages
Notifications successful but not shown
Diagnose Force Stop, disabled categories, Doze mode, and other reasons Android delivery succeeds but the user sees nothing.
In-app triggers
Audience and trigger requirements, including the session-start rule that catches most setup mistakes.
In-app messages setup
Build the message itself in the OneSignal dashboard, including audience, display options, and frequency.
Mobile SDK reference: addTrigger
Full cross-platform reference for
addTrigger, addTriggers, removeTrigger, and clearTriggers.