Sync DND state between Android phone and watch

Related tags

App android wearos
Overview

DNDSync

This App was developed to enable Do Not Disturb (DND) synchronization between my Pixel phone and the Galaxy Watch 4 since this option was only available if paired with a Samsung phone.

If installed on phone and watch it enables either a 1-way sync or a 2-way sync, depending on the preferences. I also added the functionality to automatically toggle Bedtime Mode. Use case: At night I put my phone into DND and I want my watch to automatically enable Bedtime Mode. This functionality is realized via an Accessibility Service, since I couldn't find how to enable it programmatically (any hints are highly appreciated).

Tested on Pixel 3a XL paired with a Galaxy Watch 4 (40mm)

DNDSync demo

Video link: https://youtu.be/rHy6kCBNOzA

Setup

For now the App is not in the Play Store. Manual installation is required. The use of ADB is required.

  • Download the .apk files from the release section (dndsync_mobile.apk and dndsync_wear.apk)

Phone

  • Install dndsync_mobile.apk on the phone adb install dndsync_mobile.apk
  • Open the App and grant the permission for DND Access by clicking on the menu entry DND Permission. This will open the permission screen. This Permission is required so that the app can read and write DND state. Without this permission the sync will not work.
  • With the switch Sync DND state to watch you can enable and disable the sync. If enabled a DND change on the phone will lead to DND change on the watch.

Watch

Setting up the watch is a bit more tricky since the watch OS lacks the permission screen for DND access. I found a way to enable the permission via ADB.

Note: This is only tested on my Galaxy Watch 4 and it might not work on other devices!

  • Connect the watch to your computer via adb (watch and computer have to be in the same network!)
    • enable Developer Options: Go to Settings -> About watch -> Software -> tap the Software version 5 times -> developer mode is on (you can disable it in the same way)
    • enable ADB debugging and Debug over WIFI (in Settings -> Developer Options)
    • note the watch IP address and port, something like 192.168.0.100:5555
    • connect to the watch with adb connect 192.168.0.100:5555 (insert your value!)
  • install the app adb install dndsync_wear.apk
  • grant permission for DND access
    adb shell cmd notification allow_listener de.rhaeus.dndsync/de.rhaeus.dndsync.DNDNotificationService
    This allows the app to listen to DND changes and changing the DND setting
  • scroll to the permission section and check if DND permission says access granted (you might need to tap on the menu entry for it to update)
  • IMPORTANT: Disable ADB debugging after you are done because it drains the battery!
  • If you want to use the Bedtime mode feature you have to enable the Accessibility service for the app. Clicking on Accessibility Service will open the setting on your watch. Go to Installed Services and enable DNDSync. The App will use this to simulate the following touch events on the screen: swipe down to open Quick Settings Panel, click the middle icon of the first row (put Bedtime Mode here) and finally close the panel. You can enable this by enabling the Bedtime Mode Setting in the App.
  • If you enable the setting Sync DND in the App a DND change on the watch will lead to a DND change on the phone
  • If you enable the setting Vibration in the App the watch will vibrate when it receives a DND sync request from the phone

Feedback

Feel free to contact me for questions, feature ideas or bugs and I will see if I can do something about it

email: [email protected]

Comments
  • bug fix: on latest galaxy watch 4 firmware, disabling DND by dnd-sync…

    bug fix: on latest galaxy watch 4 firmware, disabling DND by dnd-sync…

    … causes a dnd off => dnd on => dnd off sequence by the OS. This causes a constant change of DND modes due to the DND-Sync messages. Fixed by introducing a delay to send only the last DND state to the phone.

    opened by grueni75 1
  • Update so pixel watch bedtime sync works

    Update so pixel watch bedtime sync works

    I think all that's needed to make the pixel watch bedtime sync work is to edit the midx value (which is currently the "middle" of the row for samsung watches) to instead be divided by 3. That way we get the first (left) 3rd of the screen as the click target for the midx value. And that's where the pixel watch has the bedtime mode button. I was too lazy to install the android sdk and build/debug this myself - hoping the dev is willing to give it a shot for us :).

    opened by tfennel 0
  • No Bedtime Sync - Pixel 6 Pro

    No Bedtime Sync - Pixel 6 Pro

    I really miss this having come back to Pixel from Samsung wher eit worked 100% of the time

    Since theres no "middle of the 1st row", and ive tried placing the quick tile everywhere on the first screen of them, im at a loss....

    I miss my screen going grey!!!!!!!!

    opened by stylemessiah 0
  • [Feature Request] Bedtime mode sync

    [Feature Request] Bedtime mode sync

    It would be great if this could also sync bedtime mode. On my Pixel 7 Pro enabling Bedtime mode triggers a notification from Digital Wellbeing with a title "Bedtime mode is on" and the category "Bedtime mode".

    It's probably not a good idea to key this on a string due to internationalization, but we might be able to do it based on category.

    opened by grantland 0
  • Pixel Watch: enabling acessibility services enables a screen lock sound

    Pixel Watch: enabling acessibility services enables a screen lock sound

    For some reason, while I have the acessibility service permission on for the app on the Pixel Watch, the watch will click whenever the screen switches from active to the always-on-display mode. It goes away when I revoke the permission

    opened by noiob 2
  • Pixel Watch minor change needed

    Pixel Watch minor change needed

    This works great on the Pixel watch except for one bit. You're not currently able to modify the quick settings arrangement. So the middle first row is the flashlight. This means you're not able to trigger the bedtime mode which is first icon in the third row down.

    opened by amademan78 8
  • DND Permission granted, but it's actually not (Android 13)

    DND Permission granted, but it's actually not (Android 13)

    This is kind of an issue in the sense that it should be documented, but a workaround is available for now. The application (mobile) says 'DND access granted', but it's actually not true on Android 13 (tested on a Pixel 6, 05-09-2022 security patch). This results in DND getting set from watch to phone, but not the other way around.

    What you need to do, in order to actually grant the permission are the following steps:

    • Go to app info and then hit the three dot menu in the top right, then select the option to allow the app to access restricted settings.
    • Go to Apps -> Special access -> Notifications, and here turn on notification access to DNDSync

    Once this is done, full duplex DND setting should be working again.

    opened by freshgiammi 0
Releases(v1.0)
Owner
rhaeus
rhaeus
Loco-strings-sync - A custom Gradle Plugin useful to sync loco string resources to local projects

loco-strings-sync A custom Gradle Plugin useful to sync loco string resources to

Jonathan Imperato 1 Feb 14, 2022
An Android app to watch anime on your phone without ads.

Anime X Stream An Android app to watch anime on your phone without ads. WARNING: THIS IS A BETA VERSION of application, THEREFORE YOU MAY ENCOUNTER BU

Mukul Banga 2.2k Jan 4, 2023
Just a simple tool to turn on/off DND(Do Not Disturb) automatically when using specified apps.

AutoDND Just a simple tool to turn on/off DND(Do Not Disturb) automatically when using specified apps. Ever feel disturbed by notifications and maybe

null 6 May 24, 2022
Communicating between Wear OS and Android device using the OpWear module and a sample of displaying real-time camera on the watch and sending commands to the mobile by Wear OS.

OpWear-Cam Communicating between Wear OS and Android device using the OpWear module and a sample of displaying real-time camera on the watch and sendi

AmirHosseinAghajari 6 Nov 8, 2022
Whatsapp based Phone number verification.Verify your phone number easily through whatsapp

Whatsapp Based Login Try this to implement fastest phone number verification system [ ⚡ ] Verify your phone number through whatsapp android LinkedIn B

MorningStar 10 Jun 21, 2022
Market Watch is Android app using Alpha Vantage API. Live stock and market data.

Donate If you like this app please donate Bitcoin: bc1qwqqpuy54qfja7h5dzpd9swgrnkql02t8cacn62 About this app Market Watch allows to watch and track s

Krzysztof Kobiałka 1 May 22, 2022
Learn about your favorite Marvel characters, super heroes, villains and watch videos from official Marvel youtube channel.

Marvel Super Heroes Android App ?? Learn about your favorite Marvel characters, super heroes, villains and watch videos from official Marvel youtube c

Lucas Cabral 5 May 24, 2022
Android app for watch replays at wasd.tv with autoscroll chat

WasdReplayAndroid Приложение для просмотра записей на васде с чатом на андроиде. https://github.com/Kirimatt/WasdReplayAndroid/blob/master/app/build/i

Azamat 25 Nov 12, 2022
Android TicWatch E-3 API 28 in Kotlin Animated Watch

AndroidTicWatchE3 -WEAR OS API 28 in Kotlin Android Studio- [CODE SNIPPETS] TicWatch E-3 Virtual Star Pet Features: Daily Background Change Holiday Mo

Sarah Bass 3 Aug 16, 2022
WatchFaceAlphaKotlin - Demonstrates watch faces using the new androidX alpha libraries (Kotlin)

Alpha WatchFace Sample (Kotlin) Demonstrates watch faces using the new androidX

Bastiaan Quast 0 Jan 4, 2022
DAVx⁵ is an open-source CalDAV/CardDAV suite and sync app for Android.

DAVx⁵ Please see the DAVx⁵ Web site for comprehensive information about DAVx⁵. DAVx⁵ is licensed under the GPLv3 License. News and updates: @davx5app

bitfire web engineering 478 Dec 28, 2022
Android application to sync RSS without a server using DecSync

Flym DecSync Flym DecSync is a fork of Flym which adds synchronization using DecSync. To start synchronizing, all you have to do is synchronize your s

Aldo Gunsing 20 Dec 30, 2022
Sync floder from drive to local storage

GDrive #refrence and steps to upload - https://developers.google.com/drive/api/v3/manage-uploads to download - https://developers.goo

Karn_Rahul 0 Nov 4, 2021
Initiate immediate phone call for React Native on iOS and Android.

react-native-immediate-call-library Initiate immediate phone call for React Native on iOS and Android. Getting started Using npm: npm install react-na

null 7 Sep 7, 2022
Candash - A simple Android app that turns your phone into an instrument cluster for your Tesla Model 3 and Y

What is CANdash? CANdash is an Android app that turns your Android device into a

Nick Nguyen 31 Nov 5, 2022
A handy phone call manager with phonebook, number blocking and multi-SIM support

Simple Dialer A lightweight app for handling your calls, no matter where are you. Comes with a handy call log for easy call initiation. There is a qui

Simple Mobile Tools 443 Jan 6, 2023
STxMobile is a proof of concept of an Android app for remotely controlling the Raymarine ST2000+ tiller pilot from an Android phone.

STxMobile STxMobile is a proof of concept of an Android app for remotely controlling the Raymarine ST2000+ tiller pilot from an Android phone. The app

Marco 8 Sep 1, 2022
Secret Codes is an Open Source application that allows you to browse through hidden codes of your Android phone.

####Secret Codes is an Open Source application that allows you to browse through hidden codes of your Android phone. This application will scan throug

Simon Marquis 251 Jan 6, 2023
⏺ A simple android app to browse your phone call recordings

⏺ Reky A simple android app to browse your phone call recordings [Under Construction] ✅ TODO Support more file name formats ?? Built-with MVVM with Si

theapache64 12 Feb 8, 2022