-
-
Notifications
You must be signed in to change notification settings - Fork 5
Messaging Get Started
The contents of this page are based on the original Firebase Documentation
Upload your APNs authentication key to Firebase. If you don't already have an APNs authentication key, see Configuring APNs with FCM.
-
Inside your project in the Firebase console, select the gear icon, select Project Settings, and then select the Cloud Messaging tab.
-
In APNs authentication key under iOS app configuration, click the Upload button.
-
Browse to the location where you saved your key, select it, and click Open. Add the key ID for the key (available in Certificates, Identifiers & Profiles in the Apple Developer Member Center) and click Upload.
private var messaging:MessagingANE;
...
messaging = MessagingANE.messaging;
messaging.addEventListener(MessagingEvent.ON_MESSAGE_RECEIVED, onMessageReceived);
private function onMessageReceived(event:MessagingEvent):void {
var remoteMessage:RemoteMessage = event.remoteMessage;
}
When you need to retrieve the current token, call the messaging.token getter. This returns null if the token has not yet been generated.
trace("FCM Token: ", messaging.token);
messaging.addEventListener(MessagingEvent.ON_TOKEN_REFRESHED, onTokenRefreshed);
private function onTokenRefreshed(event:MessagingEvent):void {
trace("FCM Refreshed Token: " + event.token);
}
- Import
native_extension/MessagingANE/Firebase.postman_collection.json
into Postman - Update [KEY SERVER ID] value with Project Settings > Cloud Messaging > Server Key from the Firebase Console
- Update [YOUR FCM TOKEN] value with the latest FCM Token
- Click Send
See this link for all possible keys in the payloads: https://firebase.google.com/docs/cloud-messaging/http-server-ref#notification-payload-support
Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.
Project setup
Analytics
Authentication
Dynamic Links
Google Sign In
Firestore
- Configuring the ANE
- Get Started
- Add and Manage Data
- Query Data
- Get Data
- Get Realtime Updates
- Perform Simple and Compound Queries
- Order and Limit Data
- Paginate Data
Messaging
One Signal
Performance
Remote Config
Storage
- Configuring the ANE
- Get Started
- Create a Reference
- Upload Files
- Download Files
- Use File Metadata
- Delete Files
Crashlytics
Vision
- Detect faces
- Scan barcodes
- Label images
- Recognize landmarks
- Natural Language
- Custom Models
External Links