If you have a mobile-friendly website and want to convert it into a downloadable mobile app for the Apple App Store or Google Play Store, Median.co is a powerful solution. It also offers a seamless integration with OneSignal to enable push notifications.
Create a new app by clicking New App/Website, or add a platform to an existing app in Settings > Push & In-App. Select the platform(s) you want to configure and click Next: Configure Your Platform.
Click Save & Continue after entering your credentials.
3
Save your App ID and install the SDK
Your App ID is displayed on the final screen. Copy and save it — you need it when initializing the SDK. Select your SDK platform, then follow the setup guide.
This guide helps you verify that your OneSignal SDK integration is working correctly by testing push notifications, subscription registration, and in-app messaging.
The native push permission prompt should appear automatically if you added the requestPermission method during initialization.
2
Check your OneSignal dashboard
Before accepting the prompt, check the OneSignal dashboard:
Go to Audience > Subscriptions.
You should see a new entry with the status “Never Subscribed”.
3
Return to the app and tap Allow on the prompt.
4
Refresh the OneSignal dashboard Subscription's page.
The subscription’s status should now show Subscribed.
You have successfully created a mobile subscription.
Mobile subscriptions are created when users first open your app on a device or if they uninstall and reinstall your app on the same device.
If all setup steps were completed successfully, the test subscriptions should receive a notification with an image included:
Images will appear small in the collapsed notification view. Expand the notification to see the full image.
5
Check for confirmed delivery.
In your dashboard, go to Delivery > Sent Messages, then click the message to view stats.You should see the confirmed stat, meaning the device received the push.
You have successfully sent a notification via our API to a segment.
In-app messages let you communicate with users while they are using your app.
1
Close or background your app on the device.
This is because users must meet the in-app audience criteria before a new session starts. In OneSignal, a new session starts when the user opens your app after it has been in the background or closed for at least 30 seconds. For more details, see our guide on how in-app messages are displayed.
2
Create an in-app message.
In your OneSignal dashboard, navigate to Messages > In-App > New In-App.
Find and select the Welcome message.
Set your Audience as the Test Users segment we used previously.
3
Customize the message content if desired.
4
Set Trigger to 'On app open'.
5
Schedule frequency.
Under Schedule > How often do you want to show this message? select Every time trigger conditions are satisfied.
6
Make message live.
Click Make Message Live so it is available to your Test Users each time they open the app.
7
Open the app and see the message.
After the in-app message is live, open your app. You should see it display:
Not seeing the message?
Start a new session
You must close or background the app for at least 30 seconds before reopening. This ensures a new session is started.
If you reinstalled or switched devices, re-add the device to Test Subscriptions and confirm it’s part of the Test Users segment.
Having issues?
Follow Getting a Debug Log while reproducing the steps above. This will generate additional logging that you can share with support@onesignal.com and we will help investigate what’s going on.
You have successfully setup the OneSignal SDK and learned important concepts like:
Instead of calling requestPermission() immediately on app open, take a more strategic approach. Use an in-app message to explain the value of push notifications before requesting permission.For best practices and implementation details, see our Prompt for push permissions guide.
How can I access OneSignal data on the client side?
Use the Median Native JavaScript Bridge method median_onesignal_info to retrieve the OneSignal Subscription ID (oneSignalUserId) and the subscription status.
javascript
var osSubscriptionId = "the OneSignal Subscription ID string"; var isSubscribedToPushNotifications; median.onesignal.onesignalInfo().then(function (oneSignalInfo) { console.log(oneSignalInfo); osSubscriptionId = oneSignalInfo.oneSignalUserId; isSubscribedToPushNotifications = oneSignalInfo.oneSignalSubscribed; });
If you send to web and mobile simultaneously:In the Launch URL section, select “Different URL for web/app”.Leave the APP URL field blank to prevent override.