Native Extensions // Push Notifications Tutorial // Part 2

This tutorial is the second part of our tutorials covering setting up and running the Push Notifications Native Extension for Adobe AIR from distriqt.

The Push Notifications extension enables the push notification functionality in your mobile AIR application allowing you to send (or push) notifications and data to users of your application. The extensions API will have you up and running with remote notifications in minutes.

Importantly this extension allows you to write code once and have access to push notifications on multiple platforms allowing you to quickly integrate push notifications no matter what platform you are developing for!

In this tutorial we will run through the concepts involved in getting your application setup and running with push notifications including:

  • Including the extension in your application
  • Registering for notifications
  • Listening for notifications
  • Sending a test notification

Continue reading Native Extensions // Push Notifications Tutorial // Part 2

Native Extensions // Push Notifications Tutorial // Part 1

This tutorial will cover setting up and running the Push Notifications Native Extension for Adobe AIR from distriqt.

With the Push Notifications extension enables the push notification functionality in your mobile AIR application allowing you to send (or push) notifications and data to users of your application. The extensions API will have you up and running with remote notifications in minutes.

Importantly this extension allows you to write code once and have access to push notifications on multiple platforms allowing you to quickly integrate push notifications no matter what platform you are developing for!

In this first tutorial we will run through the concepts involved in getting your application setup and running with push notifications including:

  • Setup and registering certificates for APNS
  • Setup for GCM

Continue reading Native Extensions // Push Notifications Tutorial // Part 1

Native Extension Tip // iOS Push Notification Custom Sound

Playing a custom sound when a push notification arrives from the Apple Push Notification Service (APNS) is quite simple.

This tip assumes you're using our extension and that you've already got push notifications running.

Firstly you need to create your sound and export as an iOS supported format, such as caf.

Then you need to include the sound to your AIR application and make sure it's packaged with the application. If you are using adt then you just need to make sure it's included as a packaged resource in your script / command line. In Flash Builder you should make sure the sound is checked to be packaged in the following location:

Project / Properties / Actionscript Build Packaging / Apple iOS / Package Contents

To play this sound you must specify the filename of the sound in the notification payload. For example, lets say you've added a sound file named example.caf into your application, we can play this sound with the notification payload as below:

  1. {
  2. aps =
  3. {
  4. alert = "test example notification message";
  5. sound = "example.caf";
  6. };
  7. }

Then the custom sound will play when your notification arrives.

Google Cloud Messaging using PHP

Google Cloud Messaging

Using PHP to send a message to a Google Cloud Messaging registered device is quite simple. In this example we'll be using curl to create a message request to send to the Google GCM server.

The code shown in this example is just going to demonstrate how to send a message to a registered device ID.
Continue reading Google Cloud Messaging using PHP

Google Cloud Messaging using C#

Google Cloud Messaging

Sending a notification to an Android device just keeps getting simpler and simpler. The current implementation of Google Cloud Messaging provides developers with a very simple way to send push notifications to a particular device.

What I'm going to show here is how to send a notification to a device once it's registered with your server.
Continue reading Google Cloud Messaging using C#