mathisdt / trackworktime

Android app to track your work time via WiFi or location and categorize each recorded intervall by a predefined client/task and a free text.
https://zephyrsoft.org/trackworktime
GNU General Public License v3.0
139 stars 30 forks source link

Android Wear support #234

Open mathisdt opened 1 year ago

mathisdt commented 1 year ago

There is a possibility to synchronize a notification with a smart watch (see this commit). But it would be nicer to have a watch face complication which both shows the current status (clocked in or out) and can be used to change the status.

The complication is nearly done (see this branch), but the communication with the phone app doesn't work yet. Probably the following architecture can help:

  1. The main app stays as it is in the branch (two additional broadcasts are sent when clock-in/clock-out status changes), especially it doesn't depend on any proprietary Google messaging library so there's no problem with F-Droid.
  2. A new companion app for the phone is created. This receives the broadcast intents from the main app and sends the data on via Data Layer. It also can receive clock-in/clock-out requests via Data Layer and forward them as intents to the main app. This app has to include the proprietary Google libraries.
  3. The Android Wear complication in the branch has to include the Data Layer libraries and then receives the messages sent by the companion app (which sets the displayed status). It also is able to send a clock-in/clock-out request via Data Layer when the complication is tapped.