All Projects → rhaeus → dnd-sync

rhaeus / dnd-sync

Licence: other
Sync DND state between Android phone and watch

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to dnd-sync

ansible-role-glusterfs
Ansible Role - GlusterFS
Stars: ✭ 95 (+313.04%)
Mutual labels:  sync
github-project-todo-md
A Tool that sync between GitHub Project Board <-> Todo Markdown text.
Stars: ✭ 17 (-26.09%)
Mutual labels:  sync
wearable
Android Wear/ Wear OS Examples
Stars: ✭ 67 (+191.3%)
Mutual labels:  wearos
flysystem-sync
Filesystem sync using Flysystem project.
Stars: ✭ 26 (+13.04%)
Mutual labels:  sync
KeePassSubsetExport
KeePassSubsetExport is a KeePass2 plugin which automatically exports a subset of entries to new databases
Stars: ✭ 39 (+69.57%)
Mutual labels:  sync
taskwarrior-syncall
Synchronization between Taskwarrior tasks and services such as Google Calendar, Notion and Google Keep. Formerly taskw_gcal_sync
Stars: ✭ 151 (+556.52%)
Mutual labels:  sync
serverless-s3bucket-sync
Serverless Plugin to sync local folders with an S3 bucket
Stars: ✭ 24 (+4.35%)
Mutual labels:  sync
transferdb
TransferDB 支持异构数据库 schema 转换、全量数据导出导入以及增量数据同步功能( Oracle 数据库 -> MySQL/TiDB 数据库)
Stars: ✭ 30 (+30.43%)
Mutual labels:  sync
homer
The home directory management tool.
Stars: ✭ 17 (-26.09%)
Mutual labels:  sync
connex
The mono-repo contains libraries to help build dApps for VeChain.
Stars: ✭ 53 (+130.43%)
Mutual labels:  sync
cossync
腾讯云COS同步(批量上传)工具
Stars: ✭ 23 (+0%)
Mutual labels:  sync
sql-sync
Offline replication between SQLite (clients) and MySQL (master).
Stars: ✭ 52 (+126.09%)
Mutual labels:  sync
ansible-pihole
Bootstrap a Raspberry Pi with Ansible and install Docker + Pi-hole
Stars: ✭ 52 (+126.09%)
Mutual labels:  sync
syncify
🤝 Shopify theme upload, download and watch development tool.
Stars: ✭ 50 (+117.39%)
Mutual labels:  sync
twilio-taskrouter-realtime-dashboard
Twilio TaskRouter Realtime Dashboard using Sync
Stars: ✭ 51 (+121.74%)
Mutual labels:  sync
syncTabs
Sync your firefox tabs with Safari on iOS
Stars: ✭ 25 (+8.7%)
Mutual labels:  sync
mongofluxd
Real time sync from MongoDB into InfluxDB
Stars: ✭ 33 (+43.48%)
Mutual labels:  sync
node-v
🔒 Secure ❄️ Synchronized ⚡️ Realtime ☁️ Cloud 🌈 Native JavaScript Variables & Events
Stars: ✭ 27 (+17.39%)
Mutual labels:  sync
preserver-plus
Minimal notes app
Stars: ✭ 34 (+47.83%)
Mutual labels:  sync
SyncUtil
Sync Utilities For UNET
Stars: ✭ 38 (+65.22%)
Mutual labels:  sync

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).

NOTE: For Bedtime mode toggle to work it is important that on the watch the Bedtime Mode button is on the first page of quick settings and the middle button in the first row!

Part of this project is inspired by blundens work, please check their GitHub if you want to know more.

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]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].