I have a specific problem: I have a Android 1.6 device that uses bluetooth to connect to a smartphone (android) and use tethering to access internet... Bluetooth itself cannot be used for anything else except that connection. It also doesn't have a wifi.
Now, I'm trying to make an app for that device that will connect to a "server" app on the smartphone! What is the easiest way of doing this? I have a simular app running but I have to manualy type the IP of the "server" (if smartphone is on wifi). Can I somehow programatically get the IP of the tethering smartphone or something if it using bluetooth tethering?
Thanks!
You could run a terminal emulator on your smartphone and try running the following commands:
Perhaps you can run those commands from within your app? Otherwise, you would have to read through the Android API manual, which can be found here.
UPDATE: as of Android Nougat 7.x, ifconfig is present, and netcfg is gone.
This question, also seems to be related and may be of use.