Hello, Can I wake up wear from the app? Currently ...
# compose-wear
l
Hello, Can I wake up wear from the app? Currently I can do it on iOS, but on Android I haven’t found any documentation about this? I want to start workout from the app, and it wake up wear and start record exercise with hearth, burn calories... Thank you.
g
Do you mean wake up / launch Wear app from the phone app? If so, yes - see https://developer.android.com/reference/androidx/wear/remote/interactions/RemoteActivityHelper and also WearableListenerService: https://developers.google.com/android/reference/com/google/android/gms/wearable/WearableListenerService Also worth looking at Horologist, which has some capability for supporting this type of behaviour: https://google.github.io/horologist/datalayer-helpers-guide/
l
thank you, i want start workout from app on mobile, then app on wear will wake up and start workout( to log distance, hearth, calories)
m
Send a message from the phone app to the watch app. Note: this is unrelated to Compose or Wear Compose.
l
i got it, thank you.
i want, receive action from app: then: navigation to screen on wear. Current use navigation compose wear: https://developer.android.com/training/wearables/compose/navigation I am having an issue, when receiving data from activity, then start root each screen in navigation?
g
You can use deeplinks as one solution to navigate directly to a particular screen: https://developer.android.com/jetpack/compose/navigation#deeplinks
See also https://developer.android.com/training/app-links/deep-linking as you might not want a generic web intent e.g. https://myapp/... but instead an app intent myapp://.../ as the former come with more setup restrictions (see the note on that link, "...a generic web intent resolves to an activity in your app only if your app is approved for the specific domain contained in that web intent ..."
❤️ 1
👍 1
l
thank you for your support.
@Garan Jenkin: onDataChange when emit 2 item same: 1. “event”“REST”,“title”“Squats” 2. “event”“REST”,“title”“Squats” not emit. But when trigger: 1. “event”“REST”,“title”“Squats” 2. “event”“COMPLETE”,“title”“Squats” 3. “event”“REST”,“title”“Squats”
Besides WearableListenerService, are there other methods to emit data between wear app and smart phone?