Cómo saber en PHP si se está visualizando una página web desde un componente WebView de Android

Este código detectará si se está visualizando desde un componente WebView

isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH']=='com.nombreapp'

Notice: Trying to access array offset on value of type null in /var/www/javierleal.com/web/wp-content/plugins/adapta-rgpd/lib/vendor/Mustache/Parser.php on line 278

Notice: Trying to access array offset on value of type null in /var/www/javierleal.com/web/wp-content/plugins/adapta-rgpd/lib/vendor/Mustache/Parser.php on line 278

Notice: Trying to access array offset on value of type null in /var/www/javierleal.com/web/wp-content/plugins/adapta-rgpd/lib/vendor/Mustache/Parser.php on line 278