
Quote from alexander_loc on February 25, 2023, 5:29 pmwhen using neoDeviceGetInfo, I received information about the user's browser on a mobile device - unknow, while everything is fine from the desktop. Mobile browsers on iOS are not supported?
P S everything is fine on the Android emulator
when using neoDeviceGetInfo, I received information about the user's browser on a mobile device - unknow, while everything is fine from the desktop. Mobile browsers on iOS are not supported?
P S everything is fine on the Android emulator

Quote from luishp on February 26, 2023, 3:12 pm@alexander_loc no idea sorry, I don't have any iOS device to test it.
Please use this link and let me know what results you get (it's using the original JavaScript library included with the plugin):https://matthewhudson.github.io/current-device/
Regards.
@alexander_loc no idea sorry, I don't have any iOS device to test it.
Please use this link and let me know what results you get (it's using the original JavaScript library included with the plugin):
https://matthewhudson.github.io/current-device/
Regards.

Quote from alexander_loc on February 26, 2023, 3:31 pm@luishp Information about the device, operating system and orientation is displayed correctly, but I do not see information about the user's browser (Chrome, Safari, etc.)
@luishp Information about the device, operating system and orientation is displayed correctly, but I do not see information about the user's browser (Chrome, Safari, etc.)

Quote from luishp on February 26, 2023, 6:30 pm@alexander_loc please unintall neoDevide and install the attached one.
Let me know if it works.Thank you!
@alexander_loc please unintall neoDevide and install the attached one.
Let me know if it works.
Thank you!
Uploaded files:
Quote from alexander_loc on February 27, 2023, 5:59 pmThank you, now Safari is defined correctly, but for example, Bing browser, Yandex is also defined as Safari, and Chrome is defined as unknown. Is it possible to at least make sure that only Safari is detected, and other browsers are also unknown?
Thank you, now Safari is defined correctly, but for example, Bing browser, Yandex is also defined as Safari, and Chrome is defined as unknown. Is it possible to at least make sure that only Safari is detected, and other browsers are also unknown?

Quote from luishp on February 27, 2023, 11:15 pm@alexander_loc this is the JavaScript function I'm using to detect the web browser. In Windows at least it seems to work correctly.
If you can find a better method I will be glad to update it, but I have not found a better one.function getBrowserName() { const userAgent = navigator.userAgent; if (userAgent.indexOf("Firefox") !== -1) { return "Firefox"; } else if (userAgent.indexOf("Edg") !== -1) { return "Microsoft Edge"; } else if (userAgent.indexOf("Chrome") !== -1 && userAgent.indexOf("Edge") === -1) { return "Chrome"; } else if (userAgent.indexOf("Safari") !== -1 && userAgent.indexOf("Chrome") === -1) { return "Safari"; } else if (userAgent.indexOf("OPR") !== -1 || userAgent.indexOf("Opera") !== -1) { return "Opera"; } else if (userAgent.indexOf("Trident") !== -1) { return "Internet Explorer"; } else { return "Unknown"; } }
@alexander_loc this is the JavaScript function I'm using to detect the web browser. In Windows at least it seems to work correctly.
If you can find a better method I will be glad to update it, but I have not found a better one.
function getBrowserName() {
const userAgent = navigator.userAgent;
if (userAgent.indexOf("Firefox") !== -1) {
return "Firefox";
} else if (userAgent.indexOf("Edg") !== -1) {
return "Microsoft Edge";
} else if (userAgent.indexOf("Chrome") !== -1 && userAgent.indexOf("Edge") === -1) {
return "Chrome";
} else if (userAgent.indexOf("Safari") !== -1 && userAgent.indexOf("Chrome") === -1) {
return "Safari";
} else if (userAgent.indexOf("OPR") !== -1 || userAgent.indexOf("Opera") !== -1) {
return "Opera";
} else if (userAgent.indexOf("Trident") !== -1) {
return "Internet Explorer";
} else {
return "Unknown";
}
}

Quote from alexander_loc on February 28, 2023, 10:18 amlet isSafari = navigator.vendor.match(/apple/i) && !navigator.userAgent.match(/crios/i) && !navigator.userAgent.match(/fxios/i) && !navigator.userAgent.match(/YaBrowser/i) && !navigator.userAgent.match(/edg/i) && !navigator.userAgent.match(/Opera|OPT\//); if (isSafari) { alert("Safari") } else { alert("Other browser") }I found this method, checked it on all mobile browsers for iOS (Safari, FireFox, Opera, Chrome, Yandex, Edge). Since I only need to discover Safari for iOS to show the user instructions for installing PWA, otherwise I will be prompted to log in via Safari. That way worked for me. Maybe this should be added to the neoDevice plugin in order to detect safari for ios in order to install PWA? We will take the value true/false into a variable
let isSafari = navigator.vendor.match(/apple/i) &&
!navigator.userAgent.match(/crios/i) &&
!navigator.userAgent.match(/fxios/i) &&
!navigator.userAgent.match(/YaBrowser/i) &&
!navigator.userAgent.match(/edg/i) &&
!navigator.userAgent.match(/Opera|OPT\//);
if (isSafari) {
alert("Safari")
} else {
alert("Other browser")
}
I found this method, checked it on all mobile browsers for iOS (Safari, FireFox, Opera, Chrome, Yandex, Edge). Since I only need to discover Safari for iOS to show the user instructions for installing PWA, otherwise I will be prompted to log in via Safari. That way worked for me. Maybe this should be added to the neoDevice plugin in order to detect safari for ios in order to install PWA? We will take the value true/false into a variable

Quote from luishp on February 28, 2023, 7:08 pm@alexander_loc please check the attached plugin. I have added a new command: neoDevideIsSafari with your code.
Thank you!
@alexander_loc please check the attached plugin. I have added a new command: neoDevideIsSafari with your code.
Thank you!

Quote from alexander_loc on February 28, 2023, 8:58 pmThank you Luis! Now the notification about the installation of PWA on iOS works perfectly!
Attached the result of my test application.
Together we need to make more solutions for mobile devices :)
Thank you Luis! Now the notification about the installation of PWA on iOS works perfectly!
Attached the result of my test application.
Together we need to make more solutions for mobile devices :)