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
- Host: GitHub
- URL: https://github.com/janumedia/gcm_ane
- Owner: janumedia
- Created: 2014-05-03T23:59:32.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-05-04T01:05:04.000Z (over 11 years ago)
- Last Synced: 2024-12-29T08:41:44.030Z (10 months ago)
- Topics: adobe-air, android, ane, gcm, gcm-ane, google, notification-native-extension
- Size: 145 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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).