Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

How do I enable/disable hotspot or tethering mode programmatically on Android?

$
0
0

I see many references on Android's website to local Only Hotspot

However I need to manage the cellular hotspot programmatically from a background service as I can do manually from the pulldown menu.

This used to be done like:

method = wifiManager.getClass().getDeclaredMethod("setWifiApEnabled", WifiConfiguration.class, Boolean.TYPE);method.invoke(wifiManager, wifiConfiguration, activated);

However this feature has been deprecated.

My wireless provider (AT&T) is trying to charge me differently based on what device is connected and how. The network should be agnostic to devices and just transport my packets to their destination. I hope this is not related, but I am worried we our losing control over our devices.

Does Android really not provide simple API calls for managing the hotspot?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>