No Internet Available, sometimes
Wifi connects for sometimes then disconnects and then never connects

This question seems to be similar to your situation. OP reported that the problem was solved by using this app: https://play.google.com/store/apps/details?id=org.wahtod.wififixer&amp;hl=en

EDIT:
Taken from Wifi keeps disconnecting and reconnecting frequently

1.Dial *#0011#

2.Then press the menu button and select wifi

3.You'll notice an ON button

4.Turn it Off

5.Restart phone

p.s.: When you restart your phone, recheck if it's still OFF, if not repeat til it works.

Alternatively, you may want to try the possible solutions listed here: https://www.connectify.me/blog/fix-internet/how-to-fix-android-wifi-disconnect/