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 Web Push Notifications In-App Messaging
Email
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
iOS Mobile Push Notifications
Web Push Notifications In-App Messaging Create rudimentary in-app messages. Previews tend to be limited or broken.
|
Reliability |
Best-in-class reliability for messaging at scale
|
Partial outages sometimes go unreported and have persisted for days.
|
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