← Back to discussions

Nativine JS Bridge commands reference guide

SSia SinghPublished 6/7/2026471 views2 comments

Here is a complete reference sheet of available Javascript commands to interact with native iOS and Android modules using the window.Nativine bridge.

1. Send Push Token Details

Retrieve the active OneSignal push registration token from the client:
javascript
window.Nativine.getPushToken((token) => {
  console.log("Device Push Token:", token);
});

2. Device Vitals Check

Check battery levels, app version, or screen dimensions:
javascript
window.Nativine.getDeviceVitals((vitals) => {
  console.log("OS Version:", vitals.osVersion);
});

2 Comments

KKevin O6/7/2026

This is incredibly helpful! Quick question: is there a callback or event triggered when a push notification is opened while the app is active in the background?

SSia SinghAuthor6/7/2026

Yes, Nativine fires a custom window event named nativineNotificationReceived. You can listen to it like this:

javascript
window.addEventListener('nativineNotificationReceived', (event) => {
  const data = event.detail;
  console.log("Notification opened with data:", data);
});
Please log in to reply.
WhatsApp