Hi, I understand that we can implement push notifications with AJO for a Flutter mobile app. However, the documentation isn’t very clear to me.
From what I’ve read, it seems that we don’t need native code to initialize the SDK, but we do need to add some native code to pass the Firebase token, for example on Android:
After that, we should be able to listen for messages in Flutter using something like:
Is my understanding correct? I’d really appreciate some guidance on this.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Flutter wrapper doesn’t expose MobileCore.setPushIdentifier(token) directly. So you have to Fetch the Firebase token in the native Android/iOS code Call MobileCore.setPushIdentifier(token); from native code and not directly from Flutter. @NestorAr After initializing things natively, the messages should be delivered to the app via Firebase/FCM or APNs.
something like this:
FirebaseMessaging.getInstance().getToken()
.addOnCompleteListener(new OnCompleteListener<String>() {
@Override
public void onComplete(@NonNull Task<String> task) {
if (task.isSuccessful()) {
String token = task.getResult();
MobileCore.setPushIdentifier(token);
}
}
});
sample repo for flutter: https://github.com/adobe/aepsdk_flutter/tree/main
Ok perfect, I understand the part about initialization and the push notifier.
Regarding the messages, if I already have FCM implemented for push notifications in my app, does that mean I’m already set to receive AJO notifications as a RemoteMessage from FirebaseMessaging? Or do I also need a native implementation to handle these new messages from AJO?
Thank you very much for your help.
Views
Likes
Replies