0

We need a in-app notification bar. Anytime when the App receive a push-notification and no matter which activity is in front, notification bar need to be shown and float at the top of the activity. it's semitransparent, and if customize click it, it disappears.

It seems Android doesn't have a Window Frame(like IOS or Web), so we cannot draw a notification bar without Activity Context. We need to make every activity has a notification bar, and then when notification comes, we show the notification bar of current in-front activity.

I think this solution is stupid.... I want to make this notification bar global for my App, can I make this?

Leon
  • 1,935
  • 3
  • 23
  • 36

1 Answers1

0

As per android standards, notification will be shown in Android Toolbar along with sound and vibration Check out my answer here

Verify Android design guidelines for notification reference before implementing the below steps

Pushing a transparent activity on every notification is not appreciable as per Android Standards

But if you want to develop a transparent screen specifically for your application, then do the following

  1. Create an activity with transparent background Reference One and Reference Two
  2. Push this activity once notification is received with received data
  3. Handle on touch on the whole activity and dismiss the activity
Community
  • 1
  • 1
Sreehari
  • 5,621
  • 2
  • 25
  • 59