It is definitely impossible to detect an adaptive layout in the general case.
You can, of course, try to look for its characteristic features, like the meta tag viewport and similar things, but, in general, it will not work.
Alternatively, you can trust the service from Google and ask him. If, in the opinion of this service, the site has an adaptive layout, then it will tell you that:
Fine! The page is optimized for mobile devices.
otherwise, you will receive:
Not optimized for mobile devices
In other words, before displaying the site, make a request to this service and parse the result, if everything is ok - show the page, if not - then not.