1. Home
  2. Tutorials
  3. Using Native Functionality
  4. Receive Push Notifications from OneSignal

Receive Push Notifications from OneSignal

onesignal notification app

You can send your app users notifications from OneSignal. Your Dropsource project can detect notifications being received and opened, as well as accessing the information contained within them.

  1. If you haven’t already done so, create a project and configure it from the OneSignal dashboard.

    create onesignal app

    Select iOS or Android.

  2. Follow the steps to configure your app for the iOS or Android platform.

    onsignal configure

  3. Select your SDK.

    onesignal sdk

  4. Open your Dropsource app and in Settings on the left of the editor, Edit your OneSignal details.

    dropsource onesignal settings

    Enter the App ID from your OneSignal Settings. On Android you’ll also need the Google Project Number you entered while configuring your OneSignal project (the Sender ID in your Firebase project).

  5. Build your Dropsource app using the Test button at the top of the editor and open it in the simulator from My Builds. Once your app has run, back in the OneSignal dashboard configuration screen, click Check Subscribed Users.

    onesignal install

    You should see confirmation that you have your first subscribed user. Once your configuration steps are complete you can close the configuration settings.

    onesignal config complete

    Your dashboard will indicate your new subscribed user.

    onesignal subscribed

  6. In Messages, select New Message to send your first notification.

    new onesignal message

    Select your audience and click Next.

  7. Enter your notification content, including a title and message body.

    onesignal message

    Click Next.

  8. Select your message options. You can set a variety of details on the notification UI and associated data, however to send a simple test message you can just click Next.

    onesignal options

  9. Select scheduling options for your notification and click Next.

    onesignal schedule

  10. Check through all of the details in the confirmation screen and, if you’re happy with your settings, click Send Message.

    onesignal confirm

  11. Test your Dropsource app on a mobile device to receive the notification. It should appear as soon as the app runs. If the app is open when the notification arrives it will appear over the screen. Otherwise, depending on your platform / OS version, it will appear in the notification bar / by swiping down to see your notifications, and clicking it will open your app / bring it to the front.

    onesignal notification app

    Your OneSignal dashboard will update with any clicks on notifications sent.

    onesignal notification clicks

    You can view various stats related to messages you’ve sent in the past, including conversion info.

  12. Respond to notifications in your Dropsource app. If you need to detect notifications being received or clicked within your Dropsource app you can do so. Open Lifecycle on the left of the editor. Open the OneSignal Event you need.

    onesignal lifecycle

    In any Actions you add to a OneSignal notification Event, you can access the notification data via the Event Data. Typically you will save the data in Device Variables, then process or display it when an Event occurs in one of your app pages.

    onesignal event

You can integrate your OneSignal notifications setup with an API to automate sending messages to your users. You can also create templates to reuse elements of your OneSignal notification messages, and can carry out A/B testing. Your Dropsource app can also build the notification message data into its processing, for example showing the user particular content when they respond to a notification.

Was this article helpful to you? Yes No

How can we help?