Android app fails to connect to wifi SSID with no internet for 2nd attempt

A

AC Question

Description :

I am trying to connect to raspberry hotspot wifi(which doesn't have any internet) through app(which I am developing) and able to connect to on the first attempt. Now I am trying to connect to another SSID(which have internet) . After some time i am trying to disconnect from this said(which was having internet) and now trying to connect to raspberry hotspot wifi , I am not able to connect to raspberry hotspot wifi this time. Please help me to fix this.... Thanks in Advance ...

android app -> raspberry wifi(status connected)
-> another SSID(which have internet)(connected but disconnect from raspberry wifi)
--> back to raspberry wifi(disconnect from another SSID and connect to this wifi but unable to do so)