I get "Internet may not be available" on my new Samsung J5 Prime I get "Internet may not be available" on my new Samsung J5 Prime around every 5 minutes.
This did not happen with other Android devices on the same Wi-Fi router.
What can be the problem?  

Model SM-G570M
Android 7.0
As strange as it seems, I now have come to an understanding that this issue may be related to an IP address conflict between the router and the connecting device or at least a faulty DHCP implementation (as discussed in some Samsung forums but for slightly different models).

It could perhaps a bug related the way the router handles 2.4GHz &lt;=> 5GHz switching, causing an uncomplete handover (5GHz SSID to 2.4GHz or vice versa) (but users complain its worse when dealing with 5GHz only)



A probable workaround is setting static IP address for the wi-fi:


  
  Go to your wifi connections, long tap on the connected wifi, until it gives you option to manage network setting,
  Then choose advanced option, and put your IP type on static, then use a new ip address (for example, if it's 192.168.1.x change it to
  192.168.1.y where y can be a value 2-100 for simplicity )
  Make sure that ip is empty in your router and your gateway is your router IP address, first DNS your router IP address,
  second one  Google DNS (8.8.8.8 or 8.8.4.4) and save it, turn your wi-fi off and on.
  


You may preferentially set the wi-fi SSID to use the 2.4GHz range.



Acknowledgements


S9 wifi internet may not be available
Galaxy S8 Wifi Issues