With the xtremepush ANE, you can add xtremepush to both iOS and Android apps built with Adobe Air.
Platform Specific Information
Xtremepush supports push notifications for iOS devices via Apples's Push Notification Service (APNs for short) and push notifications for Android devices via Google’s GCM/FCM (Google/Firebase Cloud Messaging for Android) service. This page contains Adobe Air specific instructions but you will need to connect your iOS and Android app to the platform separately.
N.B. To integrate successfully you will need to have your xtremepush App Key, APNS certs for iOS and, FCM Sender ID and FCM API key for Android. These are used to connect your app to the platform and the Apple and Google push services. You will find links to documentation on connecting to the platform below:
- Connecting your app to the platform
- Getting push certs or API keys
A full Adobe Air integration guide is given below.
Adding the ANE
Download the archive of the Xtremepush ANE from here and extract the XPush.ane file from it, to use in your app.
Open up your project properties by right-clicking on your project and selecting properties. In the menu on the left-hand side find 'ActionScript Build Path' and click it. There will now be a tab on the top of the page called 'Native Extensions', click it. Now click the button on the right-hand side that reads 'Add ANE', browse to the XPush.Ane and select it.
Now the ANE is added to the project, but we must still ensure that it is packaged with the project.
To do this, we navigate to 'ActionScript Build Packaging' on the left-hand menu. This is a drop-down menu that has all the platforms associated with the project. For each one, click on the 'Native Extensions' tab and ensure that the 'package' checkbox is checked for XPush.Ane
Android App.XML Requirements
The following is a sample manifest with all the XPush manifest requirements
iOS App.XML Requirements
The following is a sample of the XPush iOS requirements
Note: aps-environment is a must to make pushes work. "development" - for testing in sandbox APNS. "production" - for production apps
Setup the XPush Native Extension in your App
1. Import the XPushNativeASExtension
import ie.imobile.xtremepush.XPushASExtension
2. Create the Object
private var _ane:XPushASExtension; _ane = new XPushASExtension();
3. Register your settings with XtremePush
Events and Tags
If you want to send tags or events to our platform elsewhere in your app, this can be achieved with the following function calls:
_ane.hitEvent("event"); _ane.hitTag("tag"); _ane.hitTagWithValue("tag", "value");
Inbox
To open up the xtremepush inbox, use the following function call
_ane.openInbox();
Unsubscribe from Notifications
_ane.setSubscription(false);
Set External ID
_ane.setExternalId("");
Comments
0 comments
Article is closed for comments.