0

I am writing an ionic2 app and I want my app to be visible in notification area. I found an ionic native plugin to work with notification area local-notifications. Using following peace of code

 constructor(
    private localNotifications: LocalNotifications
) 

...

this.localNotifications.schedule({
        title: 'This is title',
        text: 'this is text',
        ongoing: true,
        badge: 4
    })

I was able to display it in notification area - marked red enter image description here

But I don't like the fact that it also created icon on status bar enter image description here

What I would like to have is shortcut to my application (as on first screen) but without icon (alarm) on status bar (second screen), is there a way to achieve this ?

Krzysiek
  • 328
  • 2
  • 10
  • In some devices, on some Android versions, a low-priority `Notification` will have that effect. – CommonsWare May 06 '17 at 18:40
  • I don't think you can. You can change that icon but not omit it or void it. It is design to give user a sign that there is a notification. Unlike iOS, Android show that icon so user know there is notification without need to pull down to see all notification. Also it give an hint of what kind of notification is it. – vsatkh May 07 '17 at 15:06

1 Answers1

0

I don't believe this is possible. Android automatically puts the notification icon in the status bar, respective of its order in the notification shade.

It is, however, possible to add your own icon in place of the default bell icon. You can just supply a blank icon to the plugin if you really want to hide it in the status bar, the caveat being that of course, there will just be a blank icon in the notification shade as well.

Abhishek Jain
  • 445
  • 1
  • 4
  • 11