The 'AeroGearGCMMessageReceiver' needs FCM chages:
1) rename to contain FCM? and change the base class, as well the 'onMessageReceived' method:
public class AeroGearGCMMessageReceiver extends FirebaseMessagingService {
|
...
|
public void onMessageReceived(RemoteMessage message){
|
...
|
}
|
...
|
2) Update our MessageHandler interface's onMessage() method: https://github.com/aerogear/aerogear-android-push/blob/3.0.1/aerogear-android-push/src/main/java/org/jboss/aerogear/android/unifiedpush/MessageHandler.java#L33
I think it needs to match the above signature, like:
void onMessageReceived(RemoteMessage message);
|
3) AndroidManifest.xml updates, before:
<service
|
android:name=".MyGcmListenerService"
|
android:exported="false">
|
<intent-filter>
|
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
</intent-filter>
|
</service>
|
After:
<service
|
android:name=".MyFcmListenerService">
|
<intent-filter>
|
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
</intent-filter>
|
</service>
|
4)
More details here: https://developers.google.com/cloud-messaging/android/android-migrate-fcm#migrate_your_gcmlistenerservice
|