Page 1 of 1

connecting ESP-8266 to Android

Posted: Sun Sep 18, 2016 9:26 pm
by rupak426
I am trying to conenct to esp8266 through android. I tried below code on android, but not able to connect to 8266.
Can anyone help me if I am missing some configuration related to 8266.

SSID = "\"" + + "\"";
password = getPassword(;
wifiConfiguration.preSharedKey = "\"" + password + "\"";
netid = wifiManager.addNetwork(wifiConfiguration);
wifiManager.enableNetwork(netid, true)


Re: connecting ESP-8266 to Android

Posted: Wed Jun 02, 2021 8:41 pm
by milesstone
you can try this -> Really simple TCP client I have doing my android server according this GBWhatsApp manual and all is work OK

Re: connecting ESP-8266 to Android

Posted: Thu Jun 03, 2021 3:29 pm
by Openair
Try like this:
WifiManager wifiManager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
WifiInfo wifiInfo = null;
if (wifiManager != null)
wifiInfo = wifiManager.getConnectionInfo();
String ssid = null;
if (wifiInfo != null)
ssid = wifiInfo.getSSID(); /*you will get SSID <unknown ssid> if location turned off*/