Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Do Not Disturb/Silent mode for devices #13

Closed
PlugaruT opened this issue Dec 10, 2017 · 9 comments
Closed

Add Do Not Disturb/Silent mode for devices #13

PlugaruT opened this issue Dec 10, 2017 · 9 comments
Assignees
Labels
enhancement A request for a feature or additional functionality

Comments

@PlugaruT
Copy link

Sometimes, there is a need to stop disconnect the phone from the laptop. I guess it will be a usefull addition.

@andyholmes
Copy link
Collaborator

What's the use case for disconnecting a device, rather than just unpairing?

This is possible, but there are a couple problems with disconnecting a device. The protocol is really designed to connect devices whenever possible, and usually reconnect if they disconnect. The connection process looks like this:

  • Device broadcasts identity to entire network -> Server responds with TCP connection
  • Device accepts connection -> Server sends identity
  • TLS certificates are exchanged to authenticate

In this case it might be possible to ignore the broadcasted identity and not connect, but it means keeping a list of devices to not connect to around. So it would be more "disconnect and don't ever reconnect until I say so", which is pretty much like unpairing.

OR

  • Server broadcasts identity to entire network -> Device responds with TCP connection
  • Server accepts connection -> Device sends identity
  • TLS certificates are exchanged to authenticate

In this case, the identity of the device isn't known until a connection is already established, so it would have to connect, receive identity and disconnect.

The server actually sends it's identity pretty often, and Android devices do too, so both of these would happen pretty frequently.

@PlugaruT
Copy link
Author

I was just thinking, because there are times when I don't want to unpair, but only to temporarily disconnect the service to stop receiving notifications. When I'm in a meeting or having a presentation on my laptop. You don't want to receive notifications from phone and also you still want to remain connected on same network. It's just an idea 🙂 thanks anyway for your work.

@andyholmes
Copy link
Collaborator

That's okay, I'm not against the idea, I've just never had a reason to disconnect myself. Maybe something like a "silence/silence for X hours" option similar to Android would be a better option?

@PlugaruT
Copy link
Author

Yeah, it's exactly what I want. To just silent notifications for a time.

@andyholmes andyholmes changed the title Maybe add posibility to disconnect from the phone Add silent mode for devices Dec 17, 2017
@andyholmes andyholmes added the enhancement A request for a feature or additional functionality label Dec 17, 2017
@andyholmes andyholmes self-assigned this Dec 17, 2017
@andyholmes andyholmes changed the title Add silent mode for devices Add Do Not Disturb/Silent mode for devices Dec 17, 2017
@andyholmes
Copy link
Collaborator

Sorry, for the long delay on this. This is mostly implemented in my local branch, but won't be merged until v10 unfortunately. I'll mark it as targetted for v10.

@andyholmes andyholmes modified the milestones: v10, v11 Mar 3, 2018
@andyholmes andyholmes modified the milestones: v11, wip-rewrite Apr 29, 2018
@stark-dev
Copy link

Hi! First of all, thanks again for your great work!

I was thinking about the implementation of the "Do not disturb" feature. It came to me while I was having an Hangouts call with Telephony plugin enabled. I received a phone call and the PC volume went down.
Of course, the simplest solution would be to disable the plugin while having an Hangouts call =)

There is a "Do not disturb" option in almost any Android smartphone I guess, which disables notifications. Could it be exploited/integrated in GSConnect?
At this stage, even with the DND option active, Android forwards notifications to GSConnect. Would it be possible to control this option through GSConnect (i.e., adding a DND button that enables the same mode on phone and at the same time avoids notification forwarding from phone to GSConnect)?

Maybe this feature needs some changes in the Android application, so it's just an idea I was thinking of, I don't know if it is feasible and if there is something already implemented.

Thanks again!

Mauro

@andyholmes
Copy link
Collaborator

There is a "Do not disturb" option in almost any Android smartphone I guess, which disables notifications. Could it be exploited/integrated in GSConnect?

It's possible, but it would have to be forwarded from the Android app, which it's currently not. In the GSConnect rewrite there is a Do Not Disturb switch the Mobile Settings menu that pops up a dialog like this:

dnd

When it's on, phone notifications are still received and put in the message tray but don't pop-up or make a sound. For now that's the best I can do. I would recommend you file a bug upstream with KDE Connect if you want better integration of the phone's DND feature.

On the other hand, the system volume adjustments are made based on Telephony events, which are different from Notifications, so that wouldn't change anything in that regard.

@stark-dev
Copy link

Ok, so with the new DND feature I would not see the pop up call notification, but GSConnect will still lower volume/pause media (according to Telephony config).
I personally think it would be nice to have a DND that follows Android settings, but as you confirmed it should be first implemented in the app. I will try to file a bug upstream ;)

Anyway, your DND is perfectly fine, I'm now using a system wide DND extension from pop-os, but I heard some rumours about a similar feature coming with GNOME 3.30.

It's funny that we ask for integrating notifications with desktop and than we ask for a way to stop them 😝

Thanks again for your work,

Mauro

@andyholmes
Copy link
Collaborator

Implemented in rewrite now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A request for a feature or additional functionality
Projects
None yet
Development

No branches or pull requests

3 participants