At the application level, we usually don’t have to worry about what kind of data connection is available on the device.
The operating system is the one who has this concern and management.
By directly answering your question:
No, you don’t have to modify your code, everything should work correctly.
Concern for implementation
In the application, we have to worry yes, to check if there is any connection to allow and/ or perform operations that require:
Permissions
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Example of verification
With these permissions we can consult on the device, which state the connection:
public void myClickHandler(View view) {
...
ConnectivityManager connMgr = (ConnectivityManager)
getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
if (networkInfo != null && networkInfo.isConnected()) {
// Temos ligação, continuar
} else {
// Não temos ligação, informar utilizador
}
// ...
}
This example and others can be consulted and analyzed in detail on the documentation page for:
Connecting to the Network | Android Developers (English)
TCP/IP over 3G
TCP/IP is present in devices that have GPRS service that in turn is available in mobile communications technologies from 2nd Generation.
Since a device with TCP/IP support and use receives at least one IP address, communication from it is equal to communication on any PC or server connected to the Internet.
Related reading:
Note: The particularities about the operation of all these services and protocols is already outside the scope of this site, so I will not elaborate more on the subject in this reply.