Official documentationFor comprehensive use cases and configuration details, refer to the OneSignal In-App Messages documentation.
JavaScript Bridge API reference
Median exposes OneSignal’s IAM SDK methods through the JavaScript Bridge. Use these to control when messages appear and handle user interactions.Trigger management
Triggers are conditions you set in your app that cause an in-app message to display. When you add a trigger that matches the conditions set up in OneSignal’s dashboard, the message appears.Pause and resume
Temporarily suppress in-app messages. This is useful during checkout flows, video playback, or any experience where an interruption would hurt:Click handler
Define a JavaScript function to run when a user clicks an action button inside an in-app message:Building your first in-app message
The following diagram shows how your app, the OneSignal SDK, and the dashboard work together to display and handle in-app messages. In-app messages are designed and configured entirely in the OneSignal dashboard using the HTML Composer. You control the layout, copy, buttons, and behavior. The JavaScript Bridge methods above let you control the trigger conditions and interactions from your app.Fire triggers from your app
When the conditions for your message are met, fire the corresponding trigger from your app:Templates in the OneSignal dashboard
OneSignal provides quickstart designs you can choose when creating an in-app message (Messages → In-App → New In-App), plus copy-paste HTML templates for the HTML Composer, such as surveys, promos, and onboarding-style layouts. Use their guides to pick a starting point, customize copy and styling, and follow HTML Composer rules (Liquid, click tracking, safe areas): Median documents the JavaScript Bridge (triggers and click handlers above); message HTML comes from OneSignal’s composer and template library.Testing in-app messages
Android testing requires a physical device. In-app messages can’t be tested on Android emulators. iOS testing works on both physical devices and the iOS simulator. On device or simulator:- Launch the app.
- Either wait 3+ seconds (if your message is configured with a time-based trigger), or fire the trigger manually using the JavaScript Bridge.
- The message should appear.
Live demo
Demo recording

In-app message