Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

NotificationsManager.presentCard does not send any event. #41

@SupreeNuri

Description

@SupreeNuri

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"));

Results
screenshot_20171005-003305 1

screen shot 2560-10-05 at 00 34 47

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions