At the application level, we usually do not have to worry about the type of data connection that is available on the device.
The operating system is the one who has this concern and management.
Responding directly to your question:
No, you do not have to modify your code, everything should work correctly.
Concern about having application
In the application, we have to worry about checking if there is any connection to enable and / or perform operations that require it:
Permissions
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Verification example
With these permissions we can consult on the device, which status 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 the GPRS service that is available in mobile technologies from the 2nd Generation.
Because a supported and TCP / IP-enabled device receives at least one IP address, communication from it is the same as communication on any PC or server connected to the Internet.
Related reading:
Note: The particularities of the operation of all these services and protocols are already outside the scope of this website, so I will not elaborate on this in more detail.