I am writing MonkeyRunner script which checks state of wifi and enables it.
For doing so I am importing android API and its classes. Below is code snippet;
from android.net.wifi import WifiManager
global state
state = WifiManager.isWifiEnabled()
print state
While executing I am getting an error as:
state = WifiManager.isWifiEnabled()
TypeError: isWifiEnabled(): expected 1 args; got 0
Then I realized I need permission for doing wifi operation and found in some Manifest.XML file, where they have used
My doubt is I am running the script on real device and how can I use in my MonkeyRunner script file.
Thanks in Advance Surendra Valsangker