I'm trying to trigger an action in my Android app on multiple devices at exactly the same time (or with the least possible delay / shift).
The devices are very similar (make, model, version) and are connected via USB to a Macbook Pro. I have 4 devices so far, but the final solution will contain much more, so I need a solution that works with many devices.
I tried to use sockets (Socket.io and regular WS) via Wifi and USB, but the delay increases slightly for each device, so the action is not triggered synchronously.
I also tried to send a broadcast UDP packet over USB. This leads to better results, but seems to be very inconsistent: The maximum delay ranges from 10 to 100 ms.
Synchronizing watches was another option that I thought about, but I'm not sure how it works on many devices (and NTP seems to be difficult on Android).
Any idea or pattern to meet this type of requirement? Thank you so much!