Hi,
I have developed a sapui5 app that can run on iPhone, iPad, and desktop. Depending on the running media, it will use different theme or UIs. The are several ways of detecting OS, device or screen resolutions, such as:
navigator.userAgent.match(/(iPhone)/g)
window.devicePixelRatio ==2
scree.width()
iQuery.device.is.phone
$('#phone').css('display') == 'none'
My question: what is the best and Reliable way in the code to find out which of the following devices my app is running on:
"iPhone" (valid for all kinds of resolutions)
"iPad" (all possible types)
"laptop/desktop"
Thanks.