I have a grid list, where in it gets filled with User device details as soon as the user is logged in. so can anyone help me how do i fetch the device name from the browser and also i need to fetch the location of the system.
This is the Demo of my code.
Ts:
var isDeviceType = (/iPad/i).test(navigator.userAgent) ?
"iOS" : (/iPhone/i).test(navigator.userAgent) ?
"iOS" : (/Android/i).test(navigator.userAgent) ?
"Android" : (/BlackBerry/i).test(navigator.userAgent) ?
"BlackBerry" : "Browser";
console.log(isDeviceType)
this.isDeviceType = isDeviceType;
From this set of information i am able to get on which i am using my device like Browser
but i need to fetch the name of device and i am using navigator.userAgent
to detect browser