https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
compose-wear
  • n

    Nat Strangerweather

    11/25/2022, 10:19 PM
    Hi, is there anything wrong with using a broadcast receiver to communicate between phone and watch? I see that there is a type of workaround in the DataLayer code in the Wear OS samples. Is using a BR considered bad practice?
    i
    • 2
    • 1
  • n

    Nat Strangerweather

    11/27/2022, 12:45 PM
    Using the DataLayer code in the Wear OS samples, I am getting this warning:
    This method should only be accessed from tests or within private scope
    Should I just ignore it?
    a
    y
    • 3
    • 20
  • b

    barat

    11/28/2022, 10:11 AM
    I've discussed the wear os baseline profile here a while ago, so I'd like to share the results of applying it to my product. In my case, since scrolling was slow right after the app was turned on, so I considered applying baseline profile. Since rooting is required to create a baseline profile on a real wear device, I was created baseline profile on AVD. After that, the produced baseline-profile.txt was applied to the real device and the performance test was conducted. StartupBenchmark_None timeToInitialDisplayMs. min 1259.9, median 1355.6, max 1401.2 StartupBenchmark_Partial timeToInitialDisplayMs min 928.6, median 954.6, max 982.5 ScrollBenchmark_None frameDurationCpuMs P50 12.9, P90 34.0, P95 66.9, P99 388.8 ScrollBenchmark_Partial frameDurationCpuMs P50 12.5, P90 28.7, P95 51.8, P99 156.2 It helped improve the overall speed at start-up, and helped improve the bad case of p90 or higher at scroll. Since production and application can be done separately, if you do not want rooting, it is best way to make baseline-profile with AVD.
    j
    s
    • 3
    • 2
  • l

    louiscad

    11/29/2022, 10:35 AM
    Am I the only that gets a questionably looking button by default with Wear Compose? The padding is missing. I'm quite confused at why this would be the default and what is the correct thing to do since on Material 3 for phones, it just looks correct with the right inner padding applied.
    y
    j
    f
    • 4
    • 14
  • a

    Akash Singh

    11/30/2022, 8:20 PM
    Hi, I am using Horologist (v0.2.3) libraries for my media app, I am facing a issue that whenever I click on the media notification on my watch the MainActivity gets recreated, I also tried using the Horologist sample app and the same thing happens there as well (MediaActivity gets recreated on notification click), I want to just resume the app if is in background on clicking the media notification, and recreate the activity only if app is not already in background. Does anyone have some idea how can I achieve this behaviour, or am I missing out something ?
    y
    i
    • 3
    • 24
  • b

    Bhavesh Jethani

    12/02/2022, 6:44 AM
    Hello Team, I am developing a KIOSK Mode stand alone application for Wear OS(Samsung Watch 4, Wear OS 3.5). For KIOSK mode I am using device owner permission using ADB and used device DevicePolicyManager class to handle hardware button and status bar etc. My Issue is, I am not able to open System WIFI settings which navigate to outside of KIOSK mode. Just for your information I can open system bluetooth settings without disabling KIOSK mode. 1 more information case 3 code work perfectly if your KIOSK mode is disable I tried:- Case1. context.startActivity(Intent("com.google.android.clockwork.settings.connectivity.wifi.ADD_NETWORK_SETTINGS")) Case 2. val intent = Intent(Settings.ACTION_WIFI_SETTINGS) intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK intent.addCategory(Intent.CATEGORY_LAUNCHER) startActivity(intent) Case 3. startActivity(Intent(Settings.ACTION_WIFI_SETTINGS)) If any one have any idea or workaround. Much appreciate your inputs!
    y
    k
    • 3
    • 5
  • y

    Yingding Wang

    12/04/2022, 1:28 PM
    A quick wear os 3 health service related question: I intend to design a service for my health app to collect heart rate data 24/7 using PassiveListenerService from a TileService. Will this work? There are a lot of background service restrictions on Galaxy Watch and Pixel Watch, the only service running 24/7 on Wear 2 is the watchface service, can tile service also survive the energy optimisation? I noticed that the pixel watch is constantly measuring heart rate data, can i retrieve the heart rate data retrospectively ?
    a
    l
    • 3
    • 16
  • n

    Nat Strangerweather

    12/04/2022, 5:41 PM
    I have a problem with navigation. It is working perfectly on my Wear OS emulator but crashing on my Pixel watch. I would love it if someone could please help! 😊 Details in thread.
    y
    • 2
    • 30
  • s

    Susheel

    12/07/2022, 6:26 PM
    I just enabled USB debugging on my Google Pixel Watch and wanted to connect it to my laptop to deploy a sample wear OS app but I'm unable to get them to pair. I used the adb command (enabled Debug over Wifi) using the watch's IP and the 'Pair Devices using Wi-fi' flow from Android Studio but to no avail. Am I missing any key steps?
    a
    • 2
    • 14
  • s

    Susheel

    12/07/2022, 10:30 PM
    Has anyone tried to display a QR code using wear OS? I'm just trying to show a regular png with a QR code in a sample app and I'm just seeing a white screen (I played around with the dimensions of the resource but to no avail)
    a
    j
    y
    • 4
    • 8
  • j

    John Nichol

    12/08/2022, 10:44 AM
    The Compose for Wear OS team are excited to announce that version 1.1.0 stable has been released. The latest release includes a number of bug fixes and minor UX tidy ups as well as some improvements to the Experimental placeholder UI. Additionally we have released the first 1.2.0 alpha release which adds new functionality for
    HierarchicalFocusCoordination
    as well as accessibility improvements for the
    Picker
    - see the release notes for more details.
    a
    y
    • 3
    • 3
  • a

    Amresh Singh

    12/13/2022, 7:46 AM
    Hi, I am trying to open the mobile app from the wear app, is there any documentation or tutorial for the same? Thanks!
    y
    l
    • 3
    • 11
  • f

    florent

    12/19/2022, 10:24 AM
    Hi, about bedtime on wear os, is there an API to switch the watch to bedtime mode? I had a look on the internet but there doesn't seem to have any documentation about it. Thanks!
    j
    k
    • 3
    • 6
  • y

    Yingding Wang

    12/21/2022, 4:23 PM
    Hi, i got some design idea to implement an activity chooser with compose wear. It may be done with a ScalingLazyColumn, and i will need an overlay over it to add optional nav button. Can you give me some suggestions how to implement such overlay with compose wear? or is there any other way to achieve this design?
    j
    • 2
    • 2
  • a

    Ataul Munim

    12/22/2022, 6:00 PM
    Rotary input. I would also include pointer input and move based on which half of the screen the user taps
    j
    y
    l
    • 4
    • 14
  • n

    Nat Strangerweather

    12/23/2022, 5:16 PM
    I would like to use a Hilt ViewModel in my ListenerService in order to save some info that is coming from the mobile to the watch into a Room Database. I know how to use a Hilt ViewModel in a Composable, but is it possible to use one in a ListenerService, and if so, how would I need to instantiate it?
    • 1
    • 2
  • y

    Yingding Wang

    12/27/2022, 1:07 PM
    The
    NavGraphBuilder.scalingLazyColumnComposable
    is deprecated in
    horologist==0.2.5
    , i shall use the
    listComposable
    @Deprecated(
        "Use listComposable"
    )
    public fun NavGraphBuilder.scalingLazyColumnComposable(
    In the nav example,
    NavGraphBuilder.scrollable
    has replaced
    NavGraphBuilder.scalingLazyColumnComposable
    , what is the difference between
    listComposable
    and
    scrollable
    ? The only
    listComposable
    which I can found in
    NavGraphBuilder
    is
    lazyListComposable
    .
    y
    • 2
    • 12
  • y

    Yingding Wang

    12/30/2022, 12:15 AM
    Is it possible to define different height for the items in ScalingLazyColumn? I have a head element, which shall have only the half height of the rest items. My SLC sets by default all items to the same height.
    y
    • 2
    • 10
  • n

    Nat Strangerweather

    12/30/2022, 2:11 PM
    I am using a Listener Service to insert some data from the phone to the watch into a room database. Is it possible for my watch app's UI to update itself without having to reload it once new data is inserted? Or would I need to use a broadcastReceiver to notify the UI that it needs to recompose?
    a
    • 2
    • 4
  • y

    Yingding Wang

    01/02/2023, 12:33 PM
    Hi team, I would like to suggest
    IconButton
    in
    androidx.wear.compose.material
    , just noticed that I shall not use
    androidx.compose.material
    with compose wear. As I wrapped Icon in a Button, it attaches a shadow. How can I get ride of this shadow from the
    Button
    ?
    y
    j
    • 3
    • 12
  • y

    Yingding Wang

    01/04/2023, 2:08 PM
    I applied
    horizontalScroll
    modifier to the
    androidx.wear.compose.material.dialog.Alert
    and got an
    IllegalArgumentException
    It appears to me,
    horizontalScroll
    modifier applied on the parent composable of a
    ScalingLazyColumn
    will raise the IllegalArgumentException, what is the reason for that?
    j
    s
    • 3
    • 10
  • n

    Nat Strangerweather

    01/06/2023, 6:00 PM
    Hi, just wondering if this bug fix has also been propagated to compose wear: https://android-review.googlesource.com/c/platform/frameworks/support/+/2307790. I am having problems with the
    PullRefreshIndicator
    getting stuck halfway down the screen. Any ideas?
  • j

    Jayalakshmi Android

    01/09/2023, 12:45 PM
    how to get information wears os is watch shape is square or rounded in jetpack compose ui
    a
    • 2
    • 2
  • j

    Jayalakshmi Android

    01/09/2023, 5:23 PM
    wear os timetext align to right default it is center align how to fixed this issue please help me
    k
    s
    m
    • 4
    • 3
  • y

    Yingding Wang

    01/09/2023, 7:36 PM
    The swipe back gesture of the
    horologist.WearNavScaffold
    intercepts the drag gesture intended for a
    AndroidView
    composable. Is it possible to disable the swipe back gesture on a
    NavGraphBuilder.scrollable
    temporarily?
    y
    s
    m
    • 4
    • 16
  • f

    florent

    01/11/2023, 4:46 PM
    Hi everyone, I hope you had a nice Christmas break! Just to confirm my assumption, this doesn't work at all right? https://developer.android.com/training/wearables/user-input/physical-buttons. I have also tried with
    BackHandler
    but both the emulator back button and swipe to go back doesn't trigger anything
    j
    y
    k
    • 4
    • 8
  • y

    Yingding Wang

    01/12/2023, 2:16 PM
    I added a deepLink to
    NavGraphBuilder.scrollable
    , called the deepLink with a PendingIntent from complication, and got
    java.lang.IllegalArgumentException: The WearNavigator backstack is empty, there is no navigation destination to display.
    Is this normal?
    s
    y
    j
    • 4
    • 46
  • s

    stevebower

    01/12/2023, 5:37 PM
    Compose for Wear OS 1.2.0-alpha02 was released on Wed 11th Jan. It includes bug fixes and accessibility improvements for Picker and a bug fix Placeholder so that state updates if the onContentReady lambda is updated. See the release notes for details.
  • y

    Yingding Wang

    01/13/2023, 12:36 AM
    I would like to implement an
    exercise timer
    feature with compose wear that user can start and stop the exercise. Is there any example for this? What are the options and recommendations on wear? App Widgets, Tiles, Music App like Always on App? Horologist or Glance? Thanks for any hints.
    y
    f
    j
    • 4
    • 15
  • j

    Jayalakshmi Android

    01/13/2023, 4:14 AM
    Hi @Team please help me how to create Custom KeyBoard in WearOS
Powered by Linen
Title
j

Jayalakshmi Android

01/13/2023, 4:14 AM
Hi @Team please help me how to create Custom KeyBoard in WearOS
View count: 35