AT&T Developer
  • Products
  • Resources
  • Blog
  • Sign In

Technical Library

    Device Technologies
    • Biometrics
    • Device Detection
    • HTML5
    • Mobile Web Fundamentals
    • Mobile Web Standards
    • Multi Core Coding in Dalvik
    • Multi Thread Coding in Android
    • Near Field Communication
    • NFC Forum
    • NFC Use Cases
    • NFC Case Studies
    • NFC Tags
    • GlobalPlatform and NFC
    • User Identification
    • Native Code
    Security and Privacy
    • Application Privacy Guidelines
    • Downloading DRM Content in Android
    • IPv6
    • Likelihood of a Successful Attack
    • Messaging Privacy
    • Mobile Web Security
    • Network Security
    • Security Policy
    • Security at AT&T
    • Types of Security Threats
    • Wireless Application Security
    • Security Policy Enforcement
    UI Elements
    • Slider Controls for Android
    • Check Box for Android
    • Dropdown for Android
    • Image Button for Android
    • Toggle Button for Android
    • Radio Button for Android
    • Segmented Text Toggle Button for Android
    • Static Text Toggle Button for Android
    • Switch for Android
    • Text Fields for Android
    • Getting Started with AT&T UI
    • HTML5 UI Elements
    • HTML5 Checkboxes
    • HTML5 Dropdown
    • HTML5 Image Button
    • HTML5 Image Toggle Button
    • HTML5 Radio Button
    • HTML5 Segmented Toggle Button
    • HTML5 Slider
    • HTML5 Static Text Toggle Button
    • HTML5 Switch Control
    • HTML5 Text Fields
    Network Technologies
    • IP Addresses
    • Long Term Evolution (LTE)
    • Network Timers
    • Wi-Fi
  • Other AT&T Websites
  • Best Practices
    • Hackathon Best Practices
    • Mobile Best Practices
    • Seven Common Errors Around Creating Mobile User Experiences
toggle menu

Device Detection

 

Ensure that your application provides the best possible user experience for a particular device by taking advantage of available device information. Information about a connected mobile device can be found in the HTTP User Agent and Accept headers and in the device's User Agent Profile (UAProf)—an XML document typically available on line from the manufacturer. The device capabilities information in these files enables you to provide mobile subscribers customized versions of your application. You may want to create device capability libraries to help determine the best way to serve content to various devices.

 

User Agent Header

 

The make and model of a device can be determined by the browser's user agent. See the following example.

HTTP Header: User-Agent
Example: Nokia6230i/2.0 (03.25) Profile/MIDP-2.0 Configuration/CLDC-1.1

Most device manufacturers put the make and model before the first "/", as shown in the example above for the Nokia 6230i device. Software revisions may appear after the first "/" in the user agent, and you may choose to use this information as well.

 

Accept Header

 

The Accept header contains a list of all content types, by MIME type, that will be supported by the device browser. See the following example.

HTTP Header: Accept
Example: application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html, image/jpg, image/jpeg, image/png

This example has been truncated, but you can see that this browser supports xHTML and JPEG images, among other items.

 

User Agent Profile Header

 

The User Agent Profile is an XML document that describes the device's characteristics in more detail. Depending on your content, the Accept information may provide you with the level of detail you need. However, if you need further information, you can retrieve additional details from the device manufacturer's Web site in XML form using the UAProf header. See the following example.

HTTP Header: x-wap-profile or profile
Example: http://nds1.nds.nokia.com/uaprof/N6230ir200.xml

 

Device Capability Libraries

 

You can use device capability libraries if your application is unable to use header information. These libraries may be updated and maintained without making changes to your application. To maintain your own device library, it is recommended that you keep a database of device characteristics relevant to your application. By storing the information based on the User Agent header, you can always retrieve the device-specific information you have stored with each request. Remember to stay up-to-date with the latest mobile phones on the market and keep your device library fresh with the latest information.

Back To Top
  • APIS & TOOLS
    • AT&T Video Optimizer
  • APIS & TOOLS
    • Futurist Reports
    • Technical Library
  • SUPPORT
    • Contact Us
    • FAQs
    • Twitter
  • AT&T Developer Program on Github
  • AT&T Developer Program on Facebook
  • AT&T Developer Program on Twitter
AT&T Logo

Terms of Use   Privacy Policy   Your Privacy Choices California Consumer Privacy Act (CCPA) Opt-Out Icon
©2025 AT&T Intellectual Property. All rights reserved

AT&T, the AT&T logo and all other AT&T marks contained herein are trademark of AT&T Intellectual Property and/or AT&T affiliated companies.

14100000
Session Expiring

Your session is about to expire in !

Stay Signed In
Session Expired

Sorry! Your session has expired.

Skip to content