This is work in progress code for research and testing only. Please do not use this in production.
We have the following dependencies. Put them in the same directory you cloned this repo:
- Download opencv's android SDK from here, specifically version 4.3.0, and decompress.
- Download Oboe, most recent version should work.
- Open the project in android studio. From this point on, Gradle should do the rest of the work.
You need two devices to test this on. Set one device as the "leader" and another device as the "follower". When ready, press the "play" button, and the two devices will begin to take measurements repeatedly every 30 seconds.
NOTE: There is currently no visual output of the calculated range. Distance measurements are printed over logcat
via the console at the leader's side.
This has been tested on a pair of Pixel2's.
It's likely that this code will not work on your device by default. Current thresholds are set for the Pixel2, and there are potential device-specific timing issues. If you have questions or problems, please submit an issue and PR's are encouraged!