Skip to Content
0

SAP Design studio device recognition

Mar 22, 2017 at 07:26 PM

104

avatar image

Hi All,

We are building an application using SAP Design studio SP6. One of our requirements is to be able to hide a component (such as export button) depending on whether the person is looking at the dashboard via desktop or ipad.

Our application is built using responsive UI and all but do we have any examples of identifying users device on the fly?

Any inputs will be highly appreciated. Thanks in advance.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Mustafa Bensan Mar 23, 2017 at 01:33 AM
0

Hi Alok,

You could try using the APPLICATION.getUserAgent() script method which returns a string containing information such as Operating System and Browser, which could help you differentiate between device types. If this approach doesn't provide enough device information then I suggest you consider using the SDK Development Community Client Information Component which provides more detailed information.

Regards,

Mustafa.

Share
10 |10000 characters needed characters left characters exceeded
Vidhya V Mar 23, 2017 at 07:19 AM
0

Hi Alok,

Please go with "Mustafa's" Answer. I will provide you some example code which work for me.

if (APPLICATION.getUserAgent().indexOf("Mobile") > 0) {
// Your code here
}
else{
// Your code here
}

Please let me know if your need more information.

Regards,

Vidhya.C

Share
10 |10000 characters needed characters left characters exceeded
Alok Soni Mar 27, 2017 at 12:50 PM
0

Thank you all. We are currently testing the suggestions. Will update the results to all here.

Share
10 |10000 characters needed characters left characters exceeded