17

Since the Android 6.0 update on Nexus 5, everytime I get the notification 'Sign in to WiFi network' the phone vibrates. Any idea where I can turn this off while keeping the vibration for calls, SMS, WhatsApp messages, etc.?

2
  • 4
    I am suffering with the exact same issue. I searched extensively and it appears to be a new problem with v6.0. Very, very annoying.
    – dbasch
    Commented Oct 16, 2015 at 8:49
  • 1
    None of the suggested fixes below work for me. I use Priority mode for its intended use (e.g. when I am busy or sleeping); I don't want my phone in priority mode all the time. And none of the other fixes seem to actually work (and Andrew T's answer seems to indicate why). Is there a fix for a stock rooted rom? Involving an Xposed module? Will it be fixed in later versions of Android?
    – znt
    Commented Oct 31, 2016 at 8:56

5 Answers 5

6

There is a workaround involving Do not disturb's Priority only mode.

To put it simply, you must use Priority only (from Quick Settings - Do not disturb) since it has per-app setting for notification alert that can overwrite system's default setting. Priority only mode will still show all notifications. However, only priority notifications will be alerted (sound, vibration and LED light).

The idea is to treat all notifications as priority (from Settings - Sound & notification - App notifications - [app name] - Treat as priority) except for captive portal notification, which is under Android System app (by default, system apps are not listed. You need to tick Show system from overflow menu. Leave this app as non-priority, but don't forget for the rest of system apps).

However, there are some disadvantages that you might consider first before using this workaround:

  1. You sacrifice the intended usage of Priority only mode, only leave Total silence as the only option (however, if you never intend to use this feature, then you're fortunate since you can utilize it).
  2. If you have many apps installed, it's quite tedious to set all apps to treat their notifications as priority (perhaps a script might help...). Also, every time you install a new app, you must not forget to treat its notification as priority (unless you don't care about its alert).
  3. You won't get any alerts for all notifications from Android System (you need to experiment with this, since I don't know what notifications are considered by Android System).
0
5

TL;DR

If you still want to have vibration on all notifications except for captive portal (this particular issue), I'm afraid you can't.

It's as dbasch mentioned in the comment, that the vibration (actually, the notification alert itself) was added in Marshmallow.


Technical Details

When Android detects that the WiFi needs to login to captive portal, as you already noticed, it will create a notification. It's done by setProvNotificationVisibleIntent() function in ConnectivityService.

Show or hide network provisioning notifications.

We use notifications for two purposes: to notify that a network requires sign in (NotificationType.SIGN_IN), or to notify that a network does not have Internet access (NotificationType.NO_INTERNET). We display at most one notification per ID, so on a particular network we can display the notification type that was most recently requested. So for example if a captive portal fails to reply within a few seconds of connecting, we might first display NO_INTERNET, and then when the captive portal check completes, display SIGN_IN.

The relevant code to the notification alert that is used in Android 6.0 Marshmallow:

Notification notification = new Notification.Builder(mContext)
    ...
    .setDefaults(Notification.DEFAULT_ALL)
    ...

Note that Notification.DEFAULT_ALL will "use all default values (where applicable)", which means that it depends on your system's notification setting (sound, vibration, and LED light).

Compared to the one in Android 5.x Lollipop, the code is:

Notification notification = new Notification();
...

No more, no less. That's the relevant code. new Notification() will "construct a Notification object with default values". While it seems that there's no change in the meaning, note that defaults is not set/initialized to Notification.DEFAULT_ALL (value: -1). Instead, since there's no initialization, it will be defaulted to 0, which is no alert.

Whether it's a bug overlooked by Google which has been fixed in Marshmallow or not, I don't know. Also, that's the reason why there's no alert in Android Lollipop, but now there is in Android Marshmallow.

1
  • "You can't". I bet you can with an Xposed module (or at least some preliminary reading makes me think this), although one might have to write it oneself...
    – znt
    Commented Oct 31, 2016 at 21:15
1

Only way I found to get rid of that annoying vibration is to disable completely the 'available wifi' notification. To do it go to setting-> wifi -> tap on the three vertical dots -> go to 'advanced settings' and disable the notifications for publicly accessible wifi networks. Waiting for a fix, I think it is the only solution and not so bad a loss to disable them, I always thought them useless enough.

4
  • 3
    Thanks for your answer. This does not seem to work however, it still displays a notification and vibrates even after turning off the 'Network notification' option.
    – Ritz
    Commented Oct 16, 2015 at 7:25
  • 1
    This fix does not work on my Nexus 5 either.
    – dbasch
    Commented Oct 16, 2015 at 8:49
  • I had tried this on my Moto X Pure and it doesn't work there either.
    – Nat Kuhn
    Commented Mar 26, 2016 at 16:16
  • Nor on my Moto E second generation
    – Andy Clark
    Commented Apr 13, 2016 at 15:54
1

Settings > Apps > Google Connectivity Services > Notifications > Block turns them off entirely.

2
  • Thanks, (assuming this works)! Now I just need a way to remember that I blocked this when they fix it...
    – Nat Kuhn
    Commented Mar 26, 2016 at 16:14
  • Sadly, that assumption was incorrect... did not work on my Moto X Pure
    – Nat Kuhn
    Commented Mar 28, 2016 at 2:32
0

That notification is initiated by Android System (android). You can use appops to deny Android System the permission to vibrate the device in any situation. Provided that you've setup in PC, do:

adb shell appops set android VIBRATE deny

Try connecting to a Wi-Fi with no internet access. You would still get that notification but with no vibration. If you also intend to hide that notification, you may follow the rest of the answers posted here or on this website.

To revert the changes, do:

adb shell appops set android VIBRATE allow

Vibration for calling is initiated by Dialer app, for SMS it would be your default SMS app, for WhatsApp messages, it is the same app, so they are not going to be affected. There may be unforeseen consequences of that command which I'm unaware of, so let me know about them through comments.

Note: this solution is tested on an unofficial CM13 build.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .