Search code examples
androiddnstestingresolve

Is it possible to set Android apps to connect to dev servers?


When building desktop or web apps, its easy to add fake hosts file entries so apps will connect to dev servers instead of production ones - is something similar possible for Android apps?


Solution

  • You can't edit the /etc/hosts file on most Android devices, since you normally don't have root access.

    A better option is to just build a preference into your application that allows you to specify which server your application can use when establishing it's connection.