androidkotlinwear-oscommunicationdata-layers

How can I send a image from android phone to wear os watch?


How can I send a image from android phone to wear os watch? But I want to use data layer and I want to write all these codes in two one files (like Phone.kt , Watch.kt)

Like this step

  1. Select photo in a phone
  2. Send this photo to watch
  3. Watch recives this picture
  4. Watch saves this picture

Solution

  • Check out the DataLayer example from Google's WearOS samples Github. The example covers your first three points, where the remaining task of saving the picture to the watch would be the only thing not already done but which you could grab from other examples there.