Turn off application notification

Whenever there is a notification in the android, the LED flashes until we see this notification. Can I turn off the notification (the LED is blinking) for Android applications when my service is running in the background.

+4
source share
2 answers

By default, your notifications are generated using the option: .setDefaults ((Notification.DEFAULT_ALL) which includes all options, including DEFAULT_LIGHTS, if you do not want to show the light, just set the necessary parameters. You can see what settings are available here http: // developer .android.com / reference / android / app / Notification.html About starting the while service, simply change the settings for your notification, for example, onStartCommand () for your service, and change their default value in onDestroy ().

0
source

Yes, you can. Go to settings> System → Notification indicator → check user values.

Then you get the + / plus button. At the bottom of the screen.

You can choose an application for which you do not want the notification backlight to blink :)

And select a custom color for this app, which is selected in black

No more blinking;)

I tried on 4.2.2 working

here is a screenshot of http://www.mediafire.com/?lk9ba5f0tkdb1vq

-1
source

Source: https://habr.com/ru/post/1481930/


All Articles