0

This is the first time I am integrating notifications into my application. I am using Firebase. Setup was extremely simple and I am able to view the notification in the tray.

So, when the application is open, and if it receives a notification. I would like to display the notification in the activity itself.

How should I go about this?

AL.
  • 36,815
  • 10
  • 142
  • 281
Prakash Raman
  • 13,319
  • 27
  • 82
  • 132

2 Answers2

2

You can look at Gmail approach. If there is new mail in current thread, they show SnackBar with notification.

You need to determinate connected parts of your app. And if notification connected to part where current user is - show SnackBar, and if there is something completely different - show heads-up notification.

Guide how to do Heads-Up notifications here

Guide how to do SnackBar notifications here

Ekalips
  • 1,473
  • 11
  • 20
0

Have you ever tried Pushbots , its an infra- Structure for Notifications , it has more interesting Features than Firebase. Give it a shot.

Pushbots link

Lutaaya Huzaifah Idris
  • 3,596
  • 8
  • 38
  • 77