How to use OneSignal

What is OneSignal?

OneSignal is an omnichannel customer engagement platform that enables marketers and developers to send messages to their users across multiple channels. The company was started in 2015, after our founders personally experienced the challenges of sending effective push notifications to players of their games and saw a need for a better solution.

Today, OneSignal is used by over 1.8 million marketers and developers worldwide. OneSignal makes it incredibly easy to implement push notifications, emails, SMS messaging, and In-App Messaging into their apps.

Even more importantly, OneSignal helps marketers send effective messages, by providing simple and powerful tools for customer journey automation, segmentation, personalization, and orchestration of messages across channels.

Since its founding, OneSignal has grown rapidly, thanks to the support of our loyal customers and the growing worldwide popularity of the platform. We continue to invest heavily in our best-in-class push notification product.

OneSignal and Firebase 

While both Firebase and OneSignal can be used to send mobile push notifications, the two platforms have many key differences. Here’s an overview of some of them.

OneSignal

Firebase

Channels Supported

Android Mobile Push Notifications

Deliver all types of Android notifications with accurate previews. Built-in support for rich media, android channels, and real-time delivery confirmation. Supports all Android devices, including newer Huawei devices and Amazon Fire tablets.

iOS Mobile Push Notifications
Deliver all types of iOS notifications with accurate previews. Built-in support for rich media, app clips, content extensions, live activities. See real-time delivery confirmation data.

Web Push Notifications
Create rich web push notifications with the OneSignal dashboard, API, and web SDKs. Easily customize permission prompts. Deliver to all supported browsers.

In-App Messaging
Easy and robust drag-and-drop In-App Messaging creation tools. Create rich in-app messages with multiple pages, animations, surveys, forms, and permissions workflows. Use custom HTML and Javascript for advanced customizations. Preview in real-time and test on a mobile device before sending to your users.

 

Email
Easily create and deliver rich email messages from OneSignal’s API and Dashboard. Personalize email content with tag substitution. Leverage multiple ESPs, including Mailgun, SendGrid, and MailChimp Transactional.

 

SMS & MMS

Easily and affordably deliver SMS and MMS messages worldwide through OneSignal’s dashboard and APIs. Leverage multiple numbers, including toll-free, A2P 10dlc, long codes, and short codes.

Android Mobile Push Notifications
Deliver notifications to Android Applications. No accurate previews. Requires additional engineering for proper support of Android Channels and other capabilities. Amazon Fire tablets and newer Huawei devices are not supported, even though they run the Android OS.

 

iOS Mobile Push Notifications
Deliver iOS notifications. No accurate previews. Limited support for rich media. Limited support for notification types that requires additional development.

 

Web Push Notifications
Supports sending web push. Previews are not supported. Limited SDK support. No built-in permissions flows. Some browsers are not supported. Limited analytics.

In-App Messaging

Create rudimentary in-app messages. Previews tend to be limited or broken.

 

Reliability

Best-in-class reliability for messaging at scale


Public status page with real-time updates on deliverability and API latency.

Partial outages sometimes go unreported and have persisted for days.


No real-time deliverability information.

APIs

Robust API to send messages on any channel, including Push Notifications, Email, and SMS.

API offers advanced user segmentation capabilities.

Code examples in all major programming languages.

Analytics available on notification sends, receives, impressions, opens, and influenced opens.

API only supports push notifications.

Limited segmentation capabilities in the API.

Limited examples and complex API libraries (e.g. the “Firebase Admin SDK”) can make things difficult to implement.

Analytics on data including receives and impressions is limited to Android devices (iOS and Web not supported). No influenced open tracking.

Support

Free support for all clients via email and on-site chat.

Paid customers have access to prioritized support with an option for a dedicated customer success representative.

Thorough documentation with tutorials, best practices, code examples, videos, and troubleshooting guides.

Support primarily through a public forum or StackOverview. Most questions are not answered.

Documentation is often lacking.

Product Innovation

Approximately 40 significant product updates are released per year.

One small product update in the last year.

Country Support

Available worldwide

Blocked in China

Pricing

Nearly all free Firebase Messaging features are also available in OneSignal for free. Many paid Firebase features are also available in OneSignal for free, including OneSignal’s image hosting.

OneSignal’s paid plans offer many additional capabilities that are not available in Firebase at all.

OneSignal paid plans start at $9 per month. OneSignal also offers customizable enterprise plans for larger businesses.

Firebase allows sending notifications for free, but data storage, image hosting, and analytics have additional costs. In the case of image hosting, Firebase bandwidth costs are $0.15 per GB, which is very expensive for message delivery at scale.

Firebase’s non-messaging related products each have their own pricing model.

Setup SDK

Add Dependencies
Setup in MainApplication

Optional

Request Permission

Add EventListener

  • The first event runs when the app receives a notification while running
  • The 2nd event runs when the user opens the notification

Extend Service for custom notification

This function always runs first so we can control push notification event and custom notification view before it is sent