4

I have a messaging app (TextNow) that sometimes likes to put a sticky notification up (to notify me that I have used up my data and am being throttled), which I do not want and cannot be disabled in the apps settings.

Normally when an app abuses notifications like this I simply disable notifications for that app. However, in this case I would miss text messages if I did that. Therefor I was hoping for some way to either:

  • Block notifications based on their content.
  • For this specific app, only allow dismissable notifications.

I do have a rooted phone.

Example of the notification:

A android screenshot with a single notification showing over that says “TextNow Wireless: You have reached your 4G data limit for the month, you are now on 2G data. Tap for more info.” and a button directly underneath that says “Open textnow”

Note: I have posted an answer to this question, but I am still looking for better options.

  • What kind of notification is it? Mind mentioning the app and attach a screenshot? – Andy Yan Jan 13 '17 at 10:36
  • @andy The app is TextNow (which I've now added to my post) and I've added a screenshot. I don't really know how to specify what kind of notification other than the fact that it's not dismissable; swiping it left or right does nothing. Hopefully the screenshot helps. – Shelvacu Jan 13 '17 at 21:38
  • There is xposed module called GravityBox which have section Ultimate notification control. Is that helping? I don't know for sure if this can do what you want but it helped people to get rid of some notifications. Also if this is screenshot from your device than you have samsung device where xposed probably creates boot loop, so first google to see if xposed work on your device and than try installing framework and module mentioned above. – Једноруки Крстивоје Jan 16 '17 at 1:00
  • Also there is another Xposed module named Notify Clean that may possibly allow you to filter notifications based on their content per your original request. – Pandashire Jan 16 '17 at 1:14
  • I don't know if all sticky notifications behave the same way but I was able to remove context based notification for one app ( your app won't work in my country). Macrodroid automation may help. Trigger: Notification received> text now> text content contains > type the text or keywords contained in notification want to be removed. Action; Comfigure app notification > disable . Let me know how it goes – beeshyams Jan 16 '17 at 3:07
3
+100

is preferred option, since OP is looking for context based actions . Many apps are available. I prefer using MacroDroid, since it is free (upto 5 macros) and easy to learn (app guides you through the settings - make sure from the app settings you activate ignore battery optimisations if using Marshmallow)

OP has confirmed in his answer that Macrodroid approach as suggested by me in comments worked and his answer covers another automation app as well

You would need two macros for this to start with ( needs root)

First macro would look like this (Triggers / Actions / Constraints are added by +)

Macro 1 : Remove notification (name of macro )

Trigger : NotificationNotification ReceivedSelect ApplicationChoose AppText ContentContains (Notification Text which you wish to disable)

Actions:

Configure App NotificationsChoose AppDisable

Constraints: No Constraints

Logic: We need to identify the content of notification to disable this notification from appearing. Not specifying any Constraints means we want the macro to always run

In the next macro, we make sure that if the content of notification is anything else, that notification is shown

Macro 2 : Enable notification (name of macro )

Trigger : NotificationNotification ReceivedSelect ApplicationChoose AppText ContentExcludes (Notification Text which was disabled in earlier macro)

Actions:

Configure App NotificationsChoose AppEnable

Note:

  1. Tested and working on Moto X Play, Android 6.0.1, with a different app, since app in OP doesn't work in country

  2. In my experience, heavily modded OS's like Samsung, Huawei, MIUI at times produce unexpected results, so it is better to have two separate macros - easier to troubleshoot from the app logs.

Optimal approach

Once you have them working satisfactorily, you can elegantly combine above macros to have a single macro (not tested by me since I don't have any apps that produce multiple sticky notifications but should work). This is a better approach, since notifications aren't lost as pointed out by OP in his solution

This will dismiss any other notifications that also happen to open from the same app at the same time.

Macro : Enable / Disable notification selectively

Trigger : NotificationNotification ReceivedSelect ApplicationChoose AppText ContentAny

Actions:

If ClauseAdd ConditionNotification Present → Select Application* → Choose AppText ContentMatches ( Notification Text for which you wish to disable )

  • Add Child action ( by long press of above action) of first Macro

  • Add else clause ( long press if) and add action of second Macro

1

This can be done in a hacky way using an automation tool such as Automate or MacroDroid. Others will also likely work, but I haven't tried them. First note that:

  • This requires root.
  • This will dismiss any other notifications that also happen to open from the same app at the same time.

Make a macro that:

  1. Waits until the notification has been posted.
    • On MacroDroid, set a trigger for "Notification Received". Set the content to match the notification you want blocked.
    • On Automate, use a "Notification posted?" block with "Proceed" set to "When transition". On the flowchart, connect "No" to "In"
  2. Disables notifications for the app.
    • On MacroDroid, use Configure App Notification > Disable
    • On Automate, use the "App notification set state" block, with "Notifications" set to "off"
  3. Enables notifications for the app.
    • Same as above but enable (on) instead of disable.

Thanks to beeshyam's comment for getting me most of the way there.

  • +1 for other app. Please see combined approach in the last part of my solution to override problem identified – beeshyams Jan 16 '17 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.