Adobe AIR FCM Implementation
Environment:
AIR SDK 29
Android API 15+
Description:
I'm working on Adobe AIR android application and implementing push notifications with FCM through Native extensions. I have setup project on Firebase console and tested with native app, its working fine.
With Adobe AIR app, I'm calling ANE for FirebaseApp initialize manually passing applicationId, api key, database url, storage bucket, projectId and gcmSenderId which I received from google-services.json file. FirebaseApp gets initialized without any error.
I have mentioned FirebaseMessagingService, FirebaseInstanceIdReceiver, FirebaseInstanceIdService in manifest file.
<service android:name="{MY_PACKAGE_NAME}.FCMMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name="com.google.firebase.messaging.FirebaseMessagingService"
android:exported="true">
<intent-filter
android:priority="-500">
<action
android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:permission="com.google.android.c2dm.permission.SEND"
android:exported="true">
<intent-filter>
<action
android:name="com.google.android.c2dm.intent.RECEIVE" />
<category
android:name="{MY_PACKAGE_NAME}" />
</intent-filter>
</receiver>
<service
android:name="com.google.firebase.iid.FirebaseInstanceIdService"
android:exported="true">
<intent-filter
android:priority="-500">
<action
android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
But FirebaseInstanceId.getInstance is null and it doesn't call onNewToken method of FirebaseMessagingService class.
Please let me know if anyone faced similar issue or if I'm doing something wrong.
If more information required don't hesitate to ask.
