Hi Team,
I would like to know device detection like when user logs in i would like to show the information like he logged in particular browser how to get those details.
Thanks,
Akash.
Hi Akash,
Just to be clear you want this for reactive web app users that run your app in a computer browser?
See this older post:https://www.outsystems.com/forums/discussion/64249/how-to-make-reactive-web-outsystemsui-device-detection-work/
But even better there is a Forge component for Reactive apps to do this:https://www.outsystems.com/forge/component-overview/8580/whats-my-browser
For Mobile there are plugins like this one:
https://www.outsystems.com/forge/component-overview/5389/get-device-information
Regards,
Daniel
Thanks for the reply and i want to know logged in user location details as well could you please help me out on that
Here is a plugin for reactive:
https://www.outsystems.com/forge/component-overview/11477/geotracking
For mobile there is:
https://www.outsystems.com/forge/component-overview/1395/location-plugin
Hi @Akash Gunupudi
If you want to show or save browser name of user then you can use this JavaScript (I know its not recommend to use JS but we can use it as per requirement) code as well.
var browserName = (function(agent) {
switch (true) {
case agent.indexOf("edge") > -1:
return "MS Edge";
case agent.indexOf("edg/") > -1:
return "Edge ( chromium based)";
case agent.indexOf("opr") > -1 && !!window.opr:
return "Opera";
case agent.indexOf("chrome") > -1 && !!window.chrome:
return "Chrome";
case agent.indexOf("trident") > -1:
return "MS IE";
case agent.indexOf("firefox") > -1:
return "Mozilla Firefox";
case agent.indexOf("safari") > -1:
return "Safari";
default:
return "other";
}
})(window.navigator.userAgent.toLowerCase());
browserName hold the name of browser,
I hope it'll help you.
Thanks
Deep
Hi,
If you want to do if by javascript then you can use this script -
<script>
var x = document.getElementById("demo");
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
function showPosition(position) {
x.innerHTML = "Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
</script>
i have tried this can please share sample oml file it will be helpful for me
It's straight forward if you are not allowed to access Location then it'll not work.