How to send and receive data between a Wear OS smartwatch and a Windows PC

1k Views Asked by At

I want to notify my employee's smartwatch (Wear OS by Google) when something goes wrong with a machine at the factory. There is one Windows PC for management, and this PC holds the state of the machine. There are 10 smart watches in the factory. There is a wireless LAN access point in the factory. The Windows PC and smartwatch are in the same network.

I think there are several methods, but I would like to know the optimal solution.

For example
1.The smartwatch directly refers to the DB in the PC.
2.Send and receive messages (JSON?) Between your PC and smartwatch

If I can know how to do it, I will try to develop it.

I develop Windows PC apps well, but I have rarely developed Android apps. I'm not good at English. I asked a question in English because there is not much information in my mother tongue. Sorry if I came off as rude.

2

There are 2 best solutions below

1
On

I think you should try Firebase Cloud Messaging! It's great to send push-notifications to your Smartwatches - and it's free!

Link & Documentation: https://firebase.google.com/docs/cloud-messaging

1
On

I see 2 options here.

  1. MQTT client-server https://mqtt.org/
  2. Firebase cloud messaging https://firebase.google.com/docs/cloud-messaging

The option 1 (MQTT) is actually faster because it can run local at your LAN and doesn't depends on external service like firebase.

That means:

  • MQTT notifies from your watch to your PC or opposite directly from LAN.
  • Firebase Cloud Messaging have to notify the cloud service and then your watch will get the notification or opposite (if your LAN is connected to the internet).