Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
cpomeren003
Partner - Creator II
Partner - Creator II

Touch screen mode off in mashup

Hello everyone,

I just installed the September version of Qlik Sense and I would like to use the newly added touch screen mode option inside my mashup.

My expectation was that if I changed it inside my Qlik Sense App like this:

TouchScreen.png

It would also work inside my mashup that uses this app, but unfortunately this doesn't work. Does anyone know what else I should do to make it work inside mashups?

Kind regards,

Casper

1 Solution

Accepted Solutions
Aiham_Azmeh
Employee
Employee

Hi cpomeren003‌,

I think we missed this in the documentation; you should be able to do:

                 /**

                 * Sets device type, which modifies the UI accordingly.

                 * The device type is automatically detected if it is not manually set.

                 *

                 * @function

                 * @param {'auto'|'touch'|'desktop'} deviceType - String describing the device type.

                 *

                 * @example

                 * qlik.setDeviceType('desktop');

`                */

I hope this helps

View solution in original post

4 Replies
Aiham_Azmeh
Employee
Employee

Hi cpomeren003‌,

I think we missed this in the documentation; you should be able to do:

                 /**

                 * Sets device type, which modifies the UI accordingly.

                 * The device type is automatically detected if it is not manually set.

                 *

                 * @function

                 * @param {'auto'|'touch'|'desktop'} deviceType - String describing the device type.

                 *

                 * @example

                 * qlik.setDeviceType('desktop');

`                */

I hope this helps

cpomeren003
Partner - Creator II
Partner - Creator II
Author

That worked, I placed it here:

require( ["js/qlik"], function ( qlik ) {

    qlik.setDeviceType('desktop');

    

     Rest of code

}

Is this the preferred location or it doesn't really matter as long as it's inside the qlik.js?

Thanks for the fast response/help.

Aiham_Azmeh
Employee
Employee

Yes, this is the best location

cpomeren003
Partner - Creator II
Partner - Creator II
Author

Ok, great to know.

Thanks again!