I am trying to connect via HttpPost and send a username and password to a website and then receive a string from that website. I have tried various methods that have worked for
The problem is in wifi sleeping. Please use
WifiManager wm = (WifiManager) getSystemService(Context.WIFI_SERVICE); wifiLock = wm.createWifiLock(WifiManager.WIFI_MODE_FULL , "MyWifiLock"); wifiLock.acquire();
and permission:
uses-permission android:name="android.permission.WAKE_LOCK";