• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wifi/3G network selection at App level

 
yash bhatia
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

Is there a way in Android 2.2/2.1 to programaticaly select/de-select
the network (WiFi/3G) used by the application.

Once user de-selects WiFi and selects (3G/2G) from the application
settings, Android should use 3G/2G for any further network
communication for that app. The device level settings should not be
changed. Which means other application should still be able to use
WiFi network for their communication.

Is that possible? If yes, what are the relevant APIs.
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not how TCP/IP networking works. In a TCP/IP network, you can have multiple network interfaces all operating at the same time - WiFi, 3G, Bluetooth, USB, even infrared.

The network software makes a determination based on various metrics as to which network interface(s) it will use to satisfy transmission needs. The application does not, need not, and should not know which of these interface(s) is/are being used. Note the optional plural. Smart networks may run requests in parallel over multiple devices.

You can take a given interface offline, but the network stack will simply stop using it as a means to route data. For all apps, not just a given app.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic