Test Your Integration

Confirm the device is subscribed, send a test push, and check every app state.

Test in 6 steps#

  1. Enable debug logging

    Pass debug: true (or __DEV__) to initialize() so SDK activity shows in your console.

    javascript
    await NotifySphere.initialize({
      // ...
      debug: __DEV__, // logs SDK activity to the console
    });
  2. Confirm the device is subscribed

    Launch the app with the screen on, and tap Allow when Android 13+ or iOS asks to show notifications. Then open the app in the dashboard and go to Audience → Subscriptions. Your device should appear with the status Subscribed, along with its device name and push token. See Subscriptions.

  3. Send a test push

    In the dashboard go to Messages → Push (or click New Message on the app's Dashboard). Write a title and message, choose Send to Subscribed Users or a small segment, click Review and Send, then Yes, send. Keep Priority on High (the default) while testing: with Normal, Android can hold the message while the phone is idle, so a closed app may get it late and the delivery report won't update until it arrives.

  4. Test each app state

    Send a push in each of these states and confirm it arrives:

    • Foreground: app open on screen
    • Background: app minimized
    • Killed: app swiped away
    javascript
    NotifySphere.onNotification((notification, type) => {
      // type: 'received' | 'press' | 'opened' | 'initial'
      console.log(type, notification);
    });

    Your onNotification callback reports received, press, opened, or initial depending on the state.

  5. Check the delivery report

    Go to Delivery → Sent Messages. Each send shows its status (for example Delivered), how many devices it was sent to, and the click-through rate. See Sent Messages.

  6. Test conversion attribution

    If you use campaign deep links, open the link and call postEvent() with the nsClick token, then confirm the event is attributed to the campaign.

Stuck or something unclear? Contact us and we'll help.