| bymason.platform.ConnectivityManagerPrivileged |
A privileged extension of the existing android.net.ConnectivityManager.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Set airplane mode
| |||||||||||
Sets a network-independent global HTTP proxy of a given type.
| |||||||||||
Enable/Disable Wi-Fi
| |||||||||||
Set airplane mode
| Parameters | |
|---|---|
enable |
boolean: true to enable airplane mode, false to disable |
Sets a network-independent global HTTP proxy of a given type. This is useful for general internal/corporation-wide filtering scenarios. On a private network where the proxy is NOT accessible for any reason, this could break HTTP on a device. Use the static methods in the ProxyInfo class to provide the correct proxy settings.
NOTE: Typical HTTP proxies are generally network dependent. This setting is not on a per-network basis, but rather has a global effect.
NOTE 2: This proxy is only a recommendation and it is possible that some apps, especially native apps or those that use custom HTTP client implementations will ignore it.
See also: DevicePolicyManager.setRecommendedGlobalProxy, PAC file reference
| Parameters | |
|---|---|
proxyInfo |
ProxyInfo: An instance of android.net.ProxyInfo |
Enable/Disable Wi-Fi
| Parameters | |
|---|---|
enable |
boolean: boolean: true to enable, false to disable. |
| Returns | |
|---|---|
boolean |
false if the request cannot be satisfied; true indicates that wifi is either already in the requested state, or in progress toward the requested state. |