I am trying to build an app which will need to communicate with a Raspberry Pi HTTP server running on the same WiFi network. I am having a hard time figuring out how to do this while still staying in Expo for Android.
I can configure the Rapsberry Pi to run a local zeroconf server (avahi-daemon) which registers a named DNS entry. This works on iOS. I can use a named address like “http://raspberrypi.local” to communicate with it. However, this doesn’t work on an Android device. I could use react-native-zeroconf to discover the Pi, but that will mean ejecting. I could even do a local network scan the slow way using xmlHttpRequest, but that involves discovering your local IP address range. I am not aware of any expo compatible API to do that either.
Is there some clever hack/trick I am missing to make this work? I have complete control on the Pi so I can also change the setup on the Pi. I am really hoping to not have to eject because, well, Expo is awesome