Other features:

Payloads

Sending Messages

External Links

One Signal

This ANE implements the OneSignal iOS and Android SDKs for usage in your mobile AIR applications.

OneSignal is a high volume and reliable push notification service for websites and mobile applications. They support all major native and mobile platforms by providing dedicated SDKs for each platform, a RESTful server API, and an online dashboard for marketers to design and send push notifications.

Required For Setup

Required ANEs

To use this service add the com.distriqt.PushNotifications.OneSignal.ane variant of the extension to your project in place of com.distriqt.PushNotifications.ane. You should only add one of the variants to your project. If you need to support multiple services please use the All Services variant.

All variants of the Push Notifications extension have the same extension id: com.distriqt.PushNotifications so you should add this to your extensions list in your application descriptor:

Make sure you have added the common ANEs from the ![](Add the Extension

i.Add the Extension) section first. This includes the Core and Android Support ANEs.

Android Support ANE

Due to several of our ANE’s using the Android Support library the library has been separated into a separate ANE allowing you to avoid conflicts and duplicate definitions.
This means that you need to include the some of the android support native extensions in your application along with this extension.

You will add these extensions as you do with any other ANE, and you need to ensure it is packaged with your application. There is no problems including this on all platforms, they are just required on Android.

Note: if you have been using the older com.distriqt.AndroidSupport.ane you should remove that
ANE and replace it with the equivalent com.distriqt.androidsupport.V4.ane. This is the new
version of this ANE and has been renamed to better identify the ANE with regards to its contents.

Google Play Services

This ANE requires usage of certain aspects of the Google Play Services client library.
The client library is available as a series of ANEs that you add into your applications packaging options.
Each separate ANE provides a component from the Play Services client library and are used by different ANEs.
These client libraries aren’t packaged with this ANE as they are used by multiple ANEs and separating them
will avoid conflicts, allowing you to use multiple ANEs in the one application.

iOS

Info Additions and Entitlements

Push notifications require a few additions to the Info plist and Entitlements section
of your application to correctly configure your application for push notifications.

You should add the listing below to application descriptor iPhone node.

You must replace the BUNDLE_SEED_ID and BUNDLE_IDENTIFIER with the information you
gathered when setting up your application. Also make sure you set the environment
correctly either using production or development, both are shown in the example
below with the production version commented out. More on this below.

The first entitlement field is the aps-environment. This field indicates whether
we are using the development or the production environment. It must be either
development or production and depends on which configuration you are using.
If you are running a debug build you should use development. If you are looking
to publish the application to the AppStore, you should use production.

You should have noted the BUNDLE_SEED_ID (or App ID Prefix) and BUNDLE_IDENTIFIER
when you were setting up your application in the iOS developer center.
The seed id should be a unique ten character string and the identifier should be
similar to your AIR application id.

Android

Firstly make sure you have generated your Google Service API Key. You can follow the guide by OneSignal:

Manifest Additions

You must add all the OneSignal related manifest additions along with several additions for Cloud Messaging. This includes all the manifest additions required for Firebase core / analytics implementation.

The following shows the complete manifest additions node. You must replace APPLICATION_PACKAGE with your
AIR application’s Java package name, something like air.com.distriqt.test.
Generally this is your AIR application id prefixed by air. unless you have specified no air flair in your build options.

MultiDex Applications

If you have a large application and are supporting Android 4.x then you will need to ensure you enable your application to correctly support MultiDex to allow the application to be broken up into smaller dex packages.

This is enabled by default with recent releases of AIR (25+), except in the Android 4.x case where you need to change the manifest additions for the application tag to match the following and use the MultiDexApplication: