Automatic Registration

πŸ“˜

By default, on first launch your app will automatically register for push notifications and prompt for user consent. When set to manual, you must initiate registration using the JavaScript Bridge.

Set the Automatic Registration setting to Disabled and trigger the prompt for push notification registration using the Median JavaScript Bridge as follows:

↔️Median JavaScript Bridge

median.onesignal.register();
<a onclick="median.onesignal.register()">Register for Push Notifications</a>

Note: This functionality is only applicable for iOS and Android 13+.

🚧

Initialization vs Push Registration

Even if you delay push registration the device will still initialize with OneSignal and obtain a oneSignalUserId. To defer initialization and communication with OneSignal, refer to the setting to require user privacy consent.