phone-app

Detecting Web Applications

Ali Hutchison

6/9/2017 12:01 PM

Device Detection Analysis Device Data

51Degrees currently detects 690,259 (as of 09/06/2017) combinations of browser, operating system and hardware, more than anyone else! This includes detecting devices using native and web apps, providing the level of granularity required to optimise your online content for different devices and screen sizes. For well known applications such as Instagram, Twitter, Gmail and LinkedIn we have individual profiles due to their popularity.

How do we detect Web Apps?

There are two important properties, included in our property dictionary, that are populated for Browser Applications. The following provides the property name and description.

IsWebApp - Indicates if a web page is accessed from an application whose main function is not browsing the World Wide Web or managing emails, e.g. the Facebook App. The application must be downloaded and installed onto the device from an app marketplace such as Apple’s App Store or the Google Play Store, or via a third party as an apk file or similar. This property will return a ‘False’ value for mobile browsers such as Chrome Mobile or email browsers (such as Hotmail)

IsEmailBrowser - Indicates if the application is an email browser (Outlook, Gmail, YahooMail, etc.) that is primarily used to access and manage emails (usually from mobile devices).

When implementing or using 51Degrees product if you don’t need to separate email browsers then you would consider IsEmailBrowser OR IsWebApp equalling true to indicate an application.

Example Application User-Agents for Web Apps:

Below is an example of a standard iPhone User-Agent where no application is present.

Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8F190

Some Applications state in the User-Agent that they are an iOS Application as they show the Apple device (iPhone/iPad/iPod) that the Application runs on.

Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E304 Weibo (iPhone7,2__weibo__7.4.1__iphone__os10.3.1)

For this User-Agent we would expect these results:

IsWebApp = True
IsEmailBrowser = False
Device = iPhone
Browser Name = Weibo for iOS

In other cases, User-Agents provide us with less data, but still enough information that we know the device must be Apple as the Application can be downloaded from the iOS store. If you create an iOS app and retrieve data from a webserver, the app will create a default user agent as "AppName/version CFNetwork/version Darwin/version".

CFNetwork- Is a framework that facilitates network protocols.

Darwin- Represents the underlying software. A combination of these two elements enable us to detect the specific software component.

For the following User-Agents we would expect these results:

Twitter/6.78 CFNetwork/811.4.18 Darwin/16.5.0

IsWebApp = True
IsEmailBrowser = False
Device = iPhone
Browser Name = Twitter for iOS

GmailHybrid/4.4.42546 CFNetwork/758.2.8 Darwin/15.0.0

IsWebApp = False
IsEmailBrowser = True
Device = iPhone
Browser Name = Gmail for iOS

What about Native Apps?

Independent of Browser Application detection, 51Degrees also provides information regarding Native Keys. These are used by Native Apps to identify the device. 51Degrees provide the hardware specifications the same way as if a User-Agent was given from web page requests, giving developers the data intelligence from which to analyse and optimise their online content.

Comparing a User-Agent example to a Native Key example:

Example User-Agent: For Samsung Galaxy S7

Mozilla/5.0 (Linux; Android 6.0.1; SM-G930U Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.91 Mobile Safari/537.36

Example Native key: For Samsung Galaxy S7

Samsung|Galaxy S7|heroqlteue|SM-G930U

You can test the User-Agent example above on our User-Agent tester and find the related Native properties for the device.

Native properties found for this User-Agent below:

NativeBrand - Samsung
NativeDevice - heroqlteue
NativeModel - SM-G930U
NativeName - Galaxy S7
NativePlatform - Android

If you have any questions related to this topic or you are interested in finding out more about how we can help you drive your online strategy please contact us.