Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

cpomeren003
Contributor

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

Tags (2)
1 Solution

Accepted Solutions
Employee
Employee

Re: Touch screen mode off in mashup

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

4 Replies
Employee
Employee

Re: Touch screen mode off in mashup

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
Contributor

Re: Touch screen mode off in mashup

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.

Employee
Employee

Re: Touch screen mode off in mashup

Yes, this is the best location

cpomeren003
Contributor

Re: Touch screen mode off in mashup

Ok, great to know.

Thanks again!