Google Cloud Messaging / Push Notification Native Extension for Android
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Push Notification ANE for Android

GCM_ANE - Push Notification Native Extension for Android applications using GCM (Google Cloud Messaging)

This ANE based on Afterick's idea.


This is version 1.0 of this extension.

Extension ID



You will need the Project Number as GCM_SENDER_ID from the Google APIs Console where you enabled GCM. More information about GCM you can start from here

var gcm:GCMExtension; = new GCMExtension();
//trace (GCMExtension.VERSION);
gcm.addEventListener(GCMEvent.REGISTERED, handleRegistered, false, 0, true);
gcm.addEventListener(GCMEvent.UNREGISTERED, handleUnregistered, false, 0, true);
gcm.addEventListener(GCMEvent.MESSAGE, handleMessage, false, 0, true);
gcm.addEventListener(GCMEvent.ERROR, handleError, false, 0, true);
gcm.addEventListener(GCMEvent.RECOVERABLE_ERROR, handleError, false, 0, true);

Make sure to add this permission on your manifest file:

<!-- App receives GCM messages. -->
<uses-permission android:name="" />
<!-- GCM connects to Google Services. -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<permission android:name="air.YOUR_APP_BUNDLE_ID_HERE.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="air.YOUR_APP_BUNDLE_ID_HERE.permission.C2D_MESSAGE" />

Add inside Application tag, update YOUR_APP_BUNDLE_ID_HERE.

<service android:name="com.janumedia.ane.gcm.GCMPushIntentService" />
<receiver android:name="com.janumedia.ane.gcm.GCMPushBroadcastReceiver" android:permission="" >
		<action android:name="" />
		<action android:name="" />
		<category android:name="YOUR_APP_BUNDLE_ID_HERE" />


This ANE has been writen by I Nengah Januartha. It belongs to JanuMedia Inc. and is distributed under the Apache Licence, version 2.0.