Turn off notifications of an app programatically on Android
Asked Answered
M

2

12

I am developing a package manager application which shows checkboxes to turn off notifications from different applications installed on the Android device.

Turning off notifications of an app from Applications Manager

Since Android 4.1, users can turn off notifications of an app from application manager. Can I turn on/off notifications from an app programatically? Is there an API for doing that?

Monteiro answered 4/4, 2013 at 18:45 Comment(1)
How cruel it is that I have Android 4.0.4 and I can't turn off notifications. :|Contiguous
S
7

No, you cannot do that from your code. Perhaps on rooted devices you could do some magic, but that shall not really count for wider audience.

Slipcover answered 4/4, 2013 at 18:47 Comment(4)
For the rooted devices, XDA-developers have released a notification manager app. forum.xda-developers.com/showthread.php?t=2217572Monteiro
But rooted devices are sparse and not so huge in volumes. This is not our targetbase for distributing the app.Monteiro
Hi @Marcin Orlowski do you think android have introduce anything now a days for doing above thing ?Donnelldonnelly
@RajeshPanchal I do not think so, otherwise muted app (esp. all these posting ads there) would most likely start spamming other way.Slipcover
U
-1

If you are App dev, you should manage that on server side, having a webservice (REST API) allowing the user to unsubscribe to the notifications. Then implement a Settings section in your App where user can uncheck a notification box and that call this service. Then, your server will not send the notification to this user.

Ur answered 14/10, 2015 at 23:36 Comment(2)
I think you did not understand the question clearly. Question is how to manage blocking all the notifications of other app(s) in your app programmaticallyYadirayaeger
you didn't understood the question.Magill

© 2022 - 2024 — McMap. All rights reserved.