Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android.support.wearable.complications.ComplicationHelperActivity is deprecated #2

Open
MrCsabaToth opened this issue May 4, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@MrCsabaToth
Copy link
Member

See https://developer.android.com/jetpack/androidx/releases/wear#complications-watchface-1.0.0-alpha18 (July 21, 2021): "moved ComplicationHelperActivity to androidx.wear:wear-watchface library."
In general it'd be good to use androidx.* wherever possible.

@MrCsabaToth MrCsabaToth added the enhancement New feature or request label May 4, 2022
@MrCsabaToth MrCsabaToth self-assigned this May 4, 2022
@MrCsabaToth
Copy link
Member Author

Also note https://developer.android.com/jetpack/androidx/releases/wear#wear_complications_and_watchface_100_2
"As of 1.0.0-alpha23, the watchface and complications libraries have been moved to a unified androidx.wear.watchface group. Please see the Wear Watchface release note page for more details."

@MrCsabaToth
Copy link
Member Author

EVERYTHING is deprecated:

  • android.support.wearable.complications.ComplicationHelperActivity
  • CanvasWatchFaceService
  • ComplicationData
  • ProviderInfoRetriever
  • ComplicationProviderInfo
  • PreferenceManager.getDefaultSharedPreferences (this is me storing the color scheme selection)
  • The default constructor of android.os.Handler (EngineHandler)
  • ComplicationDrawable
  • WatchFaceService

There's not a bit which is not deprecated. The work was based on https://codelabs.developers.google.com/codelabs/watchface/index.html:
Screenshot_2023-10-07_10-46-54

In the https://github.com/android/wear-os-samples repo maybe we can start off with the https://github.com/android/wear-os-samples/tree/main/WatchFaceKotlin
The current code is Java, so essentially we'd need to rewrite the whole shebang! Our current "code" code consists of two java files, the Kotlin example is about a dozen+ Kotlin files. So we'll need some simplification and surely heavy lifting to marry the concept into that example.

It'd be great to migrate to Jetpack Compose right away, but neither the basic or the advanced Compose example seems to have complications, and it'll be enough to tackle the whole rewrite in itself, so I'd go with the traditional (XML UI) Kotlin.

Also note that I've seen some Flutter Wear OS app articles and plugins (form VGV (Very Good Ventures) for example), but those seem to be not watch faces but apps. I'd be happy to go to Flutter, although that may affect battery life and app size, however I also won't tackle that right now.

@MrCsabaToth
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant