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?
+2
A:
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.
Trevor Johns
2010-02-23 19:59:40
Is it possible to check if an app is being debugged and switch hostnames that way?
Eno
2010-02-23 21:10:17
Yes. See android.os.Debug.isDebuggerConnected(): http://developer.android.com/reference/android/os/Debug.html#isDebuggerConnected()
Trevor Johns
2010-02-23 21:45:37