FORUMS
Remove All Ads from XDA

[APP] Do Not Disturb sync for Wear 2.0

56 posts
Thanks Meter: 58
 
By raimondas.rimkus, Member on 7th May 2017, 06:54 PM
Post Reply Email Thread
2nd June 2017, 02:20 PM |#21  
Lucas_Skyline's Avatar
Senior Member
Flag Fortaleza - CE
Thanks Meter: 10
 
More
Hi, guys.

It's just me, or the app itself just put my phone in silent mode instead of do not disturb?

I know that they're almost the same, but I have some rules added to Do not disturb mode, as accept calls from some contacts...

I'm using an S8+ A 7.0 and a Huawei Watch with AW 2.0.

Thanks!
The Following User Says Thank You to Lucas_Skyline For This Useful Post: [ View ] Gift Lucas_Skyline Ad-Free
2nd June 2017, 06:05 PM |#22  
Pkt_Lnt's Avatar
Recognized Contributor
Flag SLO
Thanks Meter: 5,830
 
More
Quote:
Originally Posted by Lucas_Skyline

Hi, guys.

It's just me, or the app itself just put my phone in silent mode instead of do not disturb?

I know that they're almost the same, but I have some rules added to Do not disturb mode, as accept calls from some contacts...

I'm using an S8+ A 7.0 and a Huawei Watch with AW 2.0.

Thanks!

Might be just your phone. My Huawei 1 watch with AW 2.0 paired to my Nexus 6 with Pure Nexus (AOSP 7.1.1) does the full DND sync whether started from watch or phone.
2nd June 2017, 06:39 PM |#23  
OP Member
Thanks Meter: 58
 
More
Quote:
Originally Posted by Lucas_Skyline

Hi, guys.
It's just me, or the app itself just put my phone in silent mode instead of do not disturb?

There are 3 Do Not Disturb modes: Priority, Alarms and Silent. Wear only has one: Alarms. Now that you mentioned I did find a bug where watch would sometimes force the Alarms mode in the phone when the other was selected. It is hard to notice this in a Nexus, but maybe it is more obvious in a Samsung. A fix with version 1.8 is being pushed along with filter to have less wear->watch network traffic.

If this is not the bug you're having, then please PM with more detailed steps. This is the second time S8 owner is complaining. So either everyone has an S8 nowadays, or it actually doesn't work there
The Following User Says Thank You to raimondas.rimkus For This Useful Post: [ View ] Gift raimondas.rimkus Ad-Free
2nd June 2017, 07:34 PM |#24  
Lucas_Skyline's Avatar
Senior Member
Flag Fortaleza - CE
Thanks Meter: 10
 
More
Quote:
Originally Posted by raimondas.rimkus

There are 3 Do Not Disturb modes: Priority, Alarms and Silent. Wear only has one: Alarms. Now that you mentioned I did find a bug where watch would sometimes force the Alarms mode in the phone when the other was selected. It is hard to notice this in a Nexus, but maybe it is more obvious in a Samsung. A fix with version 1.8 is being pushed along with filter to have less wear->watch network traffic.

If this is not the bug you're having, then please PM with more detailed steps. This is the second time S8 owner is complaining. So either everyone has an S8 nowadays, or it actually doesn't work there

Just installed V 1.8, it appears to work now! But I still don't get all the checks. The steps I made:

1. Installed app on phone
2. Installed app on watch
3. Openen the app, clicked on manage permissions... it goes to samsung DND permission screen, granted for you app
4. When I go back to app, I don't have all the checks (see image attached)
Attached Thumbnails
Click image for larger version

Name:	screen.png
Views:	174
Size:	137.8 KB
ID:	4169329  
2nd June 2017, 07:39 PM |#25  
OP Member
Thanks Meter: 58
 
More
What this says is that DND permission is not granted in the Watch. You need to fallow the "Watch Setup" steps to enable it. This is only needed if you want Phone->Watch sync (otherwise you don't need to bother and Watch->Phone will still work).
The Following User Says Thank You to raimondas.rimkus For This Useful Post: [ View ] Gift raimondas.rimkus Ad-Free
4th June 2017, 11:47 AM |#26  
Junior Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by raimondas.rimkus

Android 4.3+ support is being pushed. This needed a code refactoring, so bugs are probable.

Great to hear!
I've already installed and tried it.
But on my setup (Huawei Honor X2 Android 5.1.1 + Huawei Watch 1 Android 2.0) it works like this:
- on phone it reacts only on sound mode change (not interrupt mode): when I change from normal sound to vibrate - nothing happens on watch, when I change from vibrate to silent - DND enables on watch, when I change from silent to normal sound - DND disables on watch.
- on watch: when I disable DND - sound turns on on phone (if was on silent), when I enable DND - nothing happens on phone.
So from Phone to Watch it only works if changing Silent/Nosilent.
And from Watch to Phone: it can only goes from Silent to Nosilent and not back.

And the main question is: can we use Interrupt Mode on Android prior 6 instead of Sound Modes?
Like Tasker do. Can be found here: http://tasker.dinglisch.net/userguide_summary.html search for "Interrupt Mode".

Thank you!
4th June 2017, 07:45 PM |#27  
OP Member
Thanks Meter: 58
 
More
- In my app Priority Only = Silent. I could have picked Vibrate, but it would be equally hacky. I can make watch go into DND when phone is on Vibrate. I'll still have to set either Silent or Vibrate when DND is selected in Watch.
- Android 5 interruption modes are all messed up. getCurrentInterruptionFilter() is only available since 6. I did find an API for 5 now, but it's only valid for one version: getCurrentInterruptionFilter(). Worst case scenario- that can be implemented.
- The bug that you have for setting Phone mode sounds like this: https://stackoverflow.com/a/30453461/7975770. The app can't get the current sound mode so it doesn't override it. I've added a simple hack to "Just Do It" in the attached version. Please test if it works for you.
Attached Files
File Type: apk mobile-release.apk - [Click for QR Code] (755.1 KB, 22 views)
The Following 2 Users Say Thank You to raimondas.rimkus For This Useful Post: [ View ] Gift raimondas.rimkus Ad-Free
5th June 2017, 05:16 PM |#28  
Junior Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by raimondas.rimkus

Please test if it works for you.

Hello!
I've tested this version.
Now the behavior is this:
- Phone -> Watch:
--- Vibrate -> DND enabled
--- Silent -> DND enabled
--- Normal sound -> DND disabled
- Watch -> Phone:
--- Enable DND -> Nothing happens on phone
--- Disable DND -> Phone goes to normal sound (if was on Silent or Vibrate)

Quote:
Originally Posted by raimondas.rimkus

Android 5 interruption modes are all messed up.

Sad to hear that it is so complicated in Android 5. Then maybe it is not worth to fight and bother with it.
I just thought that everything is not so bad, since Tasker is able to track and change the state of Interrupt Mode on my phone (Android 5).
But, apparently, I was wrong.
Thanks for your efforts anyway!
5th June 2017, 08:09 PM |#29  
OP Member
Thanks Meter: 58
 
More
Quote:
Originally Posted by JustACatRu

Sad to hear that it is so complicated in Android 5. Then maybe it is not worth to fight and bother with it.

Well it turned out to be not too complicated, but just hacky. New version attached. I tested the new service in Android 7 and it seems to work.

New version attached.
Attached Files
File Type: apk mobile-release.apk - [Click for QR Code] (755.9 KB, 12 views)
The Following User Says Thank You to raimondas.rimkus For This Useful Post: [ View ] Gift raimondas.rimkus Ad-Free
6th June 2017, 11:37 AM |#30  
Junior Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by raimondas.rimkus

New version attached.

Hello!
Tested Now I see button "Manage Permissions (Alternate)" - pressed and checked "DND Sync for Wear" in the list (Tasker and Android Wear is in there too).
And the behavior is this:
- Phone -> Watch:
--- Reacts on Interrupt Mode but only when changing Sound Mode
- Watch -> Phone:
--- Enable DND -> DND enabled on Phone ("Interrupt Mode" set to "priority" which is great!) in all conditions
--- Disable DND -> DND disabled on Phone ("Interrupt Mode" set to "all") BUT sometimes (when I change on the Phone Sound Mode and Interrupt Mode in some variations) it stops to disable DND on Phone.
It's hard to describe, so I've recorded a video, please, look, if you have time: https://www.youtube.com/watch?v=FbjPzAVrl_4
6th June 2017, 07:54 PM |#31  
OP Member
Thanks Meter: 58
 
More
Quote:
Originally Posted by JustACatRu

And the behavior is this:
- Phone -> Watch:
--- Reacts on Interrupt Mode but only when changing Sound Mode
- Watch -> Phone:
--- Enable DND -> DND enabled on Phone ("Interrupt Mode" set to "priority" which is great!) in all conditions
--- Disable DND -> DND disabled on Phone ("Interrupt Mode" set to "all") BUT sometimes (when I change on the Phone Sound Mode and Interrupt Mode in some variations) it stops to disable DND on Phone.

I have tested the same in 5.1 emulator and it doesn't work the way it works on your Huawei. Officially changing the DND mode triggers the RINGER_MODE_CHANGED event, but it doesn't happen in your side. First app versions used the InterruptionFilter listener, which would be triggered in your case. I removed it as the ringer mode event should have worked across all versions and it didn't require a running service. That can be reverted as S8 guys probably had a similar issue. It will just chop 3MB from everyones RAM.

As for getting from the DND + silent mode, my guess is that the later one takes priority. Maybe setting both at the same time could force it

Now I just wish that google would put this functionality back in and we wouldn't have to do all this...
The Following User Says Thank You to raimondas.rimkus For This Useful Post: [ View ] Gift raimondas.rimkus Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes