I am working on text conversion in android so I want to disable/enable Use WIfi-only option programmatically in TTS.
Here is the code to land at Google TTS option page in settings:
startActivity(new Intent().setAction("android.speech.tts.engine").setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
We can disable/enable WIFI using WifiManager :
WifiManager wifiManager = (WifiManager) this.getSystemService(Context.WIFI_SERVICE);
wifiManager.setWifiEnabled(true);
wifiManager.setWifiEnabled(false);
I have added the screenshot, please suggest me how can I achieve that?