• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Wifi/3G network selection at App level

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 28665
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic