notes-android icon indicating copy to clipboard operation
notes-android copied to clipboard

WearOS Companion App

Open Odzinic opened this issue 3 years ago • 3 comments

Hi there,

First of all, thanks for this great app. While it has helped me move away from Google Keep almost entirely I have been missing the ability to open notes on my watch. If there are no plans on implementing this feature already, I am willing to tackle it as I've been learning WearOS development and have access to a WearOS watch. Thanks!

Odzinic avatar Feb 23 '22 23:02 Odzinic

Hello there 👋

i don't have a actual Android wear device but using emulators i can imagine that this might be a useful extension.

How does this stuff usually work out? Is a separate app (with a seperate application ID) required? Can the extisting app evolved to an app that works for both, Android and Android wear?

stefan-niedermann avatar Feb 27 '22 18:02 stefan-niedermann

You can add the Wear OS app as a module inside the existing app project. This module is pointed to the same package as the original app so it can access its classes and and resource folders while also having its own for customizing the watch layouts and such.

I have never published a Wear OS app myself, but Wear OS detects applications installed on your phone and gives you the option of installing the watch version as seen in this screenshot. The Wear OS module can be specified to require a connection with a phone or to be standalone so I'm fairly confident that the Nextcloud Note logistics don't need to be rewritten or duplicated in the Wear OS app. You should just be able to call the same functions to retrieve data from the paired phone.

Odzinic avatar Feb 27 '22 18:02 Odzinic

Hi,

I looked a bit into the WearOS documentation and it arouses the following questions:

  • How much functionality should the WearOS app contain? (see https://developer.android.com/training/wearables/principles)
    • Obvious would be editing and viewing notes
  • How does the Wear app communicate? Directly to the Nextcloud server or does it sync with the Android app. Usually you would want it to sync with the Phone app but for that Google Play services are required as a dependency. I don't think, that would be too great for this app, especially the F-Droid version. A standalone WearOS app would be entirely possible though as the app doesn't need much device performance. (see https://developer.android.com/training/wearables/data/data-layer#send-and-sync-with-API)
  • How is the UI built? Views vs. Compose (see https://developer.android.com/training/wearables/apps#building-an-app)
  • How is code shared? Shared code could be moved to a "common" module. Both apps would use the same backend (persistence, network, util classes, etc.) and just have a different UI

RocketJannis avatar Jan 18 '23 16:01 RocketJannis