This repository was archived by the owner on Mar 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 73
This repository was archived by the owner on Mar 3, 2020. It is now read-only.
NotificationsManager.presentCard does not send any event. #41
Copy link
Copy link
Open
Description
I dug into the code and found that the "NotificationsManager.presentCard" will automatically log events such as dismiss, push opens, button click, etc.
The app successfully shows the Facebook CardActivity but I did not receive any events after dismissing the CardView.
Here is my onMessageReceived
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
Bundle dataBundle = new Bundle();
for (Map.Entry<String, String> entry : remoteMessage.getData().entrySet()) {
dataBundle.putString(entry.getKey(), entry.getValue());
}
}
My notification
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
intent.putExtra("Card_Bundle",dataBundle);
PendingIntent pendingIntent = PendingIntent.getActivity(this, identifier, intent, PendingIntent.FLAG_UPDATE_CURRENT);
//Facebook In-App Notification
final Notification.Builder mBuilder = new Notification.Builder(this)
.setSmallIcon(R.drawable.notification_ic_small)
.setContentTitle(title == null ? "" : title)
.setContentText(description == null ? "" : description)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
NotificationsManager.presentNotification(
this,
dataBundle,
new Intent(getApplicationContext(), MainActivity.class),
new NotificationsManager.NotificationExtender() {
@Override
public Notification.Builder extendNotification(@NonNull Notification.Builder notification) {
return mBuilder;
}
}
);
My MainActivity
NotificationsManager.presentCard(MainActivity.this, getIntent().getBundleExtra("Card_Bundle"));
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

