2

Is there any way through which I can access my desired network out Of WiFi and Cellular Network when both are Enabled.What I want to do is that in my app i want to send my data Packets over my desired Network according to my requirement whether it should be WiFi or cellular.Is there any way through which i can attain this i.e Can switch between these networks when my app is running but without turning on or Off any Network.

The problem is that when WiFi is enabled it is taken as the default network and all data is sent through WiFi network.

How can i switch between networks based on my requirement without disabling any network?.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Sarao
  • 379
  • 1
  • 7
  • 18
  • 1
    can you able to tell how are identifying that your device is connected to a network ? – Sree Apr 23 '15 at 05:21
  • 1
    @Sarao U are right no such info is available that how to diverge the packets on both networks I came across this link http://developer.android.com/reference/android/net/ConnectivityManager.html in which this was mentioned. 5. Provide an API that allows applications to request and select networks for their data traffic – Junior Bill gates Apr 23 '15 at 05:37
  • @ Sree this is not a big deal google it and u will find it that how to identify networks. But buddy the main thing is that how to use both of them at the same time. – Sarao Apr 23 '15 at 05:41
  • 2
    possible duplicate of [How to use 3G Connection in Android Application instead of Wi-fi?](http://stackoverflow.com/questions/2513713/how-to-use-3g-connection-in-android-application-instead-of-wi-fi) – ozbek Apr 23 '15 at 06:35
  • 1
    Also, please see http://stackoverflow.com/questions/5883777/android-force-data-to-be-sent-over-radio-vs-wifi – ozbek Apr 23 '15 at 06:36
  • +1 for @ozbek I don't think it's possible at all to switch at will, because when both are enabled, Wi-Fi is always preferred over 3G/4G because there are no unexpected additional costs. – Edwin Lambregts Apr 23 '15 at 12:33

0 Answers0