Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. User-Agent of my app same as native Symbian web browser
Forum Updated to NodeBB v4.3 + New Features

User-Agent of my app same as native Symbian web browser

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 3.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MichK
    wrote on last edited by
    #1

    Hi,
    I would like to set User-Agent in HTTP header of my application to same as native one of Symbian Web browser.
    Is it possible?

    User-Agent of native web browser for my C7 is following:
    Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaC7-00/022.014; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.37 Mobile Safari/533.4 3gpp-gba

    User-Agent for my C7 is retrived using QWebPage::userAgentForUrl:
    Mozilla/5.0 (Symbian/3; U; C7-00; en-GB) AppleWebKit/534.3 (KHTML, like Gecko) Qt/4.7.3 Mobile Safari/534.3

    In above string I replace part: U; C7-00; en-GB) with data extracted using QSysInfo::s60Version (). I switch case it similarly as it is done in QWebPage::userAgentForUrl and I get Series60/5.2. With QSystemDeviceInfo::manufacturer() and QSystemDeviceInfo::model() I get NokiaC7-00. At the end after / I add QSystemDeviceInfo::productName().

    After transformation my User-Agent is following:
    Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaC7-00/RM-675 ) AppleWebKit/534.3 (KHTML, like Gecko) Qt/4.7.3 Mobile Safari/534.3

    It is quite OK and phone is recognized, however I wonder if this approach is OK?
    What will happen on different models, eg Nokia N8, XP 5800; and what will happen after Symbian update?
    I would appreciate any comments, opinions and suggestions.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved