on 10-24-2017 2:26 PM
Hi,
I'm creating a responsive dashboard for both Desktop and iPad, but the functions called "Os.getDevice()" and "OS.getOS()" are not working properly. I did an "APPLICATION.createErrorMessage(device)" (being "device" a variable where the value of "OS.getDevice()" is saved), and it throws an empty message, both on PC and iPad.
How can I fix it?
Regards,
Gerard Riera Puig.
Hi all,
I just solved it using this method:
if(device.indexOf("Windows") > 0|| device.indexOf("Macintosh") > 0)
{
//Code for Desktop devices
}
else
{
//Code for mobile devices
}
I consider this post closed.
Best Regards,
Gerard Riera Puig.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe you want to be using the device api?
https://sapui5.hana.ondemand.com/1.34.7/docs/api/symbols/sap.ui.Device.html
Regards,
Jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.