Qlik Community

Ask a Question

Documents

QlikView documentation and resources.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER

Device Detection Document Extension

Brian_Munz
Specialist
Specialist

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?

0 Likes
NickHoff
Specialist
Specialist

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?

0 Likes
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

0 Likes
gautik92
Specialist III
Specialist III

how can i use this extension object

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