An open API service indexing awesome lists of open source software.

https://github.com/janumedia/gcm_ane

Google Cloud Messaging / Push Notification Native Extension for Android
https://github.com/janumedia/gcm_ane

adobe-air android ane gcm gcm-ane google notification-native-extension

Last synced: 8 months ago
JSON representation

Google Cloud Messaging / Push Notification Native Extension for Android

Awesome Lists containing this project

README

          

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](http://afterisk.wordpress.com/2012/09/22/the-only-free-and-fully-functional-android-gcm-native-extension-for-adobe-air/).

Version
---------

This is version 1.0 of this extension.

Extension ID
---------
```
com.janumedia.ane.gcm
```

Usage
---------

You will need the Project Number as GCM_SENDER_ID from the [Google APIs Console](http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=2663268) where you enabled GCM.
More information about GCM you can start from [here](http://developer.android.com/guide/google/gcm/index.html)

```
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);
gcm.register(GCM_SENDER_ID);
```

Make sure to add this permission on your manifest file:

```

```
Add inside Application tag, update YOUR_APP_BUNDLE_ID_HERE.

```





```

Author
---------

This ANE has been writen by [I Nengah Januartha](https://github.com/janumedia). It belongs to [JanuMedia Inc.](http://www.janumedia.com) and is distributed under the [Apache Licence, version 2.0](http://www.apache.org/licenses/LICENSE-2.0).