Here is a Wi-Fi issue I recently encountered on Samsung Galaxy J2 smartphone.
1) The Samsung Galaxy J2 detected the Wi-Fi on turning the Wi-Fi on. But after entering the password it would show "connecting..." but won't connect.
2) Another issue is the Wi-Fi hotspot keeps turning off and on.
If you are also experiencing the same issue, you may try the following: