Hello, I'm back for some more advice.
I used XorAndOr's B4A code successfully with both versions of the ESP (mode station, and soft AP).
My application is a keypad that would send characters to the ESP8266.
Now, my observations are as follows;
1) ESP in station mode: both the ESP and the Android connect to my router, works well, no issues. Potential problem: the ESP could get assigned a different IP by the router, and then, of course, the setup wopuldnt work.
2) ESP in soft AP mode: ESP has its own SSID, password and an apparently fixed IP. Android connects directly to the ESP module, router nowhere in the picture. Works well by itself. BUT, the android now keeps connecting to the ESP module, even when the task is done. Will not connect to the router, unless the ESP module is shut off.
So, my qyuestion is, how would it be best to proceed? Can the B4A app be modified to connect to the soft AP (case 2), do its job, and then somehow 'forget' that hot-spot, so that any further use of wifi would connect the Android to the router, instead of the ESP soft AP?
Or, somehow assign a fixed IP (not sure whether it is possible) to the ESP module in the station mode (case 1)?
Whew, I hope I have conveyed my thoughts clearly enough in this post.
Regards,
Anand