Yingding Wang
07/25/2022, 5:37 PMcom.google.android.support:wearable
to the androidx.wear
libs? There is a mapping for the android.support.wear
lib (https://developer.android.com/jetpack/androidx/migrate/class-mappings), but I haven’t found one for com.google.android.support:wearable
sofar, which contains Watchface, Complication and so on, the kotlin one might be https://developer.android.com/jetpack/androidx/releases/wear-watchface, and it feels almost impossible to just switch the libs, but more like to rewrite everything new. I would really appreciate any hints of how to do that gradually, instead of a big bang.louiscad
07/26/2022, 1:48 AMJohn Nichol
07/26/2022, 8:56 AMGaran Jenkin
07/26/2022, 9:00 AMYingding Wang
07/26/2022, 10:23 AMcom.google.android.support:wearable
and androidx.wear.watchface:watchface-complications-data-source-ktx
in the same module due to Duplicate class android.support.wearable.complications
im both libs even with gradle exclusion
implementation ("androidx.wear.watchface:watchface-complications-data-source-ktx:1.1.0") {
exclude group: "android.support.wearable", module: "complications"
}
My plan was to rewrite the complication with ComplicationDataSourceSerivce
first, the new complication seems to run on the old java watchface with only an icon issue. I really appreciate a doc on how to do this, so that I can split the development
2. I will also welcome a new codelab of how to make Kotlin WatchFace with the new androidx
api, the current kotlin watchface example from wear-os-sample uses Renderer.CanvasRenderer
is deprecated (https://github.com/android/wear-os-samples/blob/main/WatchFaceKotlin/app/src/main/[…]com/example/android/wearable/alpha/AnalogWatchCanvasRenderer.kt). I haven’t found any docs and examples on Renderer.CanvasRenderer2
with Renderer.SharedAssets
yet. How can I do that?
3. From The new Wear OS Dev Page (https://developer.android.com/wear), the “*Featured resources*” section still has the “create a Complication” link pointing to the deprecated ComplicationProviderService
site (https://developer.android.com/training/wearables/tiles/exposing-data-complications), which seems to have an PendingIntent Vulnerability issue due to the play store.