Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This technically isn't selecting the provider programmatically but on my DROID X I can do the following steps to disable data traveling over the network:</p> <p>Settings > Battery and Data Manager > Data Delivery > Data Enabled / Background Data</p> <p>I should be able to use this technique in conjunction with the LocationManager.NETWORK_PROVIDER (and hopefully the DROID Bionic) to isolate the cellular network and the WiFi. I'll let y'all know how it works out.</p> <p><strong>UPDATE</strong></p> <p>For those of you who are interested, I have been conducting many hours of research into this even after my paper was completed. This has not been tested, but from what I gleaned from the documentation one can programatically toggle between network providers by the use of the <a href="http://developer.android.com/reference/android/net/ConnectivityManager.html" rel="nofollow">ConnectivityManager</a> class in the <a href="http://developer.android.com/reference/android/net/package-summary.html" rel="nofollow">android.net</a> package. Additionally, the WiFi can be manipulated in many more ways via the <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.html" rel="nofollow">WifiManager</a> class in the <a href="http://developer.android.com/reference/android/net/wifi/package-summary.html" rel="nofollow">android.net.wifi</a> package. </p> <p>I have not had a chance to incorporate either of these approaches into an application that also uses the android.location package. However, I don't think it would be a stretch to incorporate some functionality where you use the methods of the two aforementioned classes to toggle which provider you want. Then when this method is called:</p> <pre><code>requestLocationUpdates(String provider, long minTime, float minDistance, LocationListener listener) </code></pre> <p>where the provider is the <a href="http://developer.android.com/reference/android/location/LocationManager.html#NETWORK_PROVIDER" rel="nofollow">NETWORK_PROVIDER</a> variable, the variable would automatically assume the provider that was toggled beforehand. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload