Thomas Thomas
Thomas Thomas

Reputation: 884

Get battery level of the phone from smartwatches

I try to find a way to get the phone's battery level from a watch wearable device.

I found this answer but it is the opposite (get wear battery level from the phone) : Get battery level of connected smartwatches

If I send a message from wearable to the phone (using companion activity), will I be able to send back the info ? What if companion activity not started (example: android wear stopped) ? Is there simple way to get that information?

Upvotes: 1

Views: 1225

Answers (1)

Gabriele Mariotti
Gabriele Mariotti

Reputation: 363995

You can use the same way:

  1. Wear:Connect the GoogleApiClient
  2. Wear:Send message to mobile handheld
  3. Mobile: Define a WearableListenerService which receives the message 2
  4. Mobile: send a message to the wear device
  5. Wear: Implement a MessageApi.MessageListener interface which receives the message 4
  6. Wear: Receive the message and use a LocalBroadcastManager to elaborate the message and display the value on the wear

Upvotes: 3

Related Questions