Qlik Community

QlikView Documents

Documents for QlikView related information.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.

Device Detection Document Extension

bmz
Valued Contributor

Device Detection Document Extension

I've gotten a lot of question about detecting different devices in QlikView, and I've created man extensions that were somewhat specific in targeting devices.  So what I've created now that is a way more simple extension (and way more flexible for the QV developer) is a document extension that simply detects the device information and sets a QV variable to hold that information.

Detecting a browser's userAgent is very simple and a long ugly string will be returned with a variety of information.  Go to this site to see generally how it will look:

http://www.iopus.com/imacros/demo/v5/user-agent.htm

Within that string you'll be able to find your OS as well as browser.  Also, if you're viewing on an iPhone, for example, you'll see the word "mobile" in there.

So once this variable is set, do whatever you want with it.  You can check to see if it's specifically an iPad, an iPhone, runs Android, etc.

The variable the extension is setting is called vDevice

Thanks.

Attachments
Comments
Not applicable

I downloaded the extension and included it in my application. It seemed to pull the first userAgent when I opened the document, but the vDevice variable does not seem to be changing based on the browser that I'm using to open the document via AccessPoint.

Does the extension need to be installed on the server in order for it to function via the web?

NickHoff
Valued Contributor

I'm curious about this as well.  Were you able to get this working on server?  I installed the extension, and added it to the application, but it doesn't seem to be writing to any variable named vDevice.  I did notice the extension icon is showing a red x with the description. Any ideas?

Not applicable

The extension does need to be installed on the server, as a document extension.  This blog post is helpful:

QlikTip #40: Installing/Deploying QlikView Extensions

gautik92
Valued Contributor III

how can i use this extension object

Version history
Revision #:
1 of 1
Last update:
‎11-16-2012 10:23 AM
Updated by:
bmz