I have a product on a Raspberry Pi, using Raspbian where people connect to their Pi using WiFi served from the Pi, and then access the software via the web browser on their device (smartphone, tablet, computer) as a web app essentially.
However, when androids connect to the network it tries to connect to
connectivitycheck.gstatic.com/generate_204 which returns a
204 - if it doesn't get back a 204 it assumes the connection needs logging in (via a portal etc) (ref)
How can I intercept queries to this address and then return the 204? The problem is that Android then remembers this as a "difficult" network and then lowers it's priorities for connection, and sometimes tries to reconnect several times in a frustrating way.
I'm looking for the simplest solution that ideally doesn't require any extra software installed, if this is possible.