Apps How to create Socket connection via Wifi of Mobile Network?

Hi all,
I want to create a client socket connection with a special network
type.
Example:
Socket socket = new Socket("10.0.0.21", 10000, "use wifi network");
or
Socket socket = new Socket("10.0.0.21", 10000, "use mobile network");

How to do it?
Many thanks !
 

miXer

Android Enthusiast
Android uses wifi or mobile automatically. If mobile and wifi is turned on android uses wifi. So to use a specific connection, you need to turn off on or the other manually or with code.
 
Top