I'm migrating a code from joomla 3 to joomla 4.
I used this php code to detect if the client is using a mobile device or not:
$appWeb = new JApplicationWeb;
if ($appWeb->client->mobile) {
echo "<BR>IS mobile<BR>";
}
else {
echo "<br>is NOT mobile<br>";
}
I have seen that the JApplicationWeb has changed, but I haven't found the new version of it.
Does anyone know how to make this call in joomla 4?
Thanks in advance.
I used this php code to detect if the client is using a mobile device or not:
$appWeb = new JApplicationWeb;
if ($appWeb->client->mobile) {
echo "<BR>IS mobile<BR>";
}
else {
echo "<br>is NOT mobile<br>";
}
I have seen that the JApplicationWeb has changed, but I haven't found the new version of it.
Does anyone know how to make this call in joomla 4?
Thanks in advance.
Statistics: Posted by Gibernet — Tue Apr 02, 2024 1:42 pm