Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User ohill's Avatar
    Join Date
    Mar 2013
    Posts
    9
    It appears that the user agent string given by this emulator i.e. using javascript's navigator.userAgent, is inaccurate.

    What I see is:
    Code:
    mozilla/5.0 (x11; linux86_64; rv:5.0.1) gecko/20121205 osre/2.2.1.4
    But when I go to whatismyuseragent.com or http://show-ip.net/useragent/ to check, I get this:
    Code:
    Mozilla/5.0 (Series40; Nokia305/gadCEX3.60; Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 S400viBrowser/2.0.2.68.9
    How can I resolve this? I need this for some client-side features I'm testing.

  2. #2
    Registered User grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    The UA you're seeing... is this from the browser, or from a Java app?

  3. #3
    Registered User ohill's Avatar
    Join Date
    Mar 2013
    Posts
    9
    It's from the Browser App on the Phone emulator

  4. #4
    Registered User grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    You might find someone with a better idea of the emulator browser behaviour over at the Asha web apps board.

    You might need a real device - you can access Nokia devices remotely in the remote device access section, though there does not appear to be a 305 there yet.

    Sorry I can't add more... someone else might yet contribute.

    Cheers,
    Graham.

  5. #5
    Registered User ohill's Avatar
    Join Date
    Mar 2013
    Posts
    9
    Thanks. I appreciate the suggestions. I'll look into the Asha Web apps board.

  6. #6
    Registered User ohill's Avatar
    Join Date
    Mar 2013
    Posts
    9
    It appears that the user agent string given by this emulator i.e. using javascript's navigator.userAgent, is inaccurate.

    What I see is:
    Code:
    mozilla/5.0 (x11; linux86_64; rv:5.0.1) gecko/20121205 osre/2.2.1.4
    But when I go to http://whatismyuseragent.com or http://show-ip.net/useragent/ to check, I get this:
    Code:
    Mozilla/5.0 (Series40; Nokia305/gadCEX3.60; Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 S400viBrowser/2.0.2.68.9
    How can I resolve this? I need this for some client-side features I'm testing.

  7. #7
    Nokia Developer Moderator croozeus's Avatar
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,649
    Yes, the simulator returns the linux86_64 user agent on cloud preview. You may report a bug here: http://www.developer.nokia.com/bugs/...ct=Series%2040

    If you however run the simulator in local preview mode, it gives the Series 40 user agent.
    Pankaj Nathani
    www.croozeus.com

  8. #8
    Registered User ohill's Avatar
    Join Date
    Mar 2013
    Posts
    9
    Hi Croozeus,

    Thanks for the info.

    How do I run the simulator in local preview mode?!

  9. #9
    Nokia Developer Moderator croozeus's Avatar
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,649
    Quote Originally Posted by ohill View Post
    Hi Croozeus,

    Thanks for the info.

    How do I run the simulator in local preview mode?!
    Right click on the project -> choose Local Preview of web app. The shortcut is Ctr + R.
    Pankaj Nathani
    www.croozeus.com

  10. #10
    Registered User ohill's Avatar
    Join Date
    Mar 2013
    Posts
    9
    Quote Originally Posted by croozeus View Post
    Right click on the project -> choose Local Preview of web app. The shortcut is Ctr + R.
    Are you referring to the Eclipse IDE, because I didn't install that, I only installed the Emulator?!

  11. #11
    Nokia Developer Moderator croozeus's Avatar
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,649
    Quote Originally Posted by ohill View Post
    Are you referring to the Eclipse IDE, because I didn't install that, I only installed the Emulator?!
    Where did you install the emulator from? I'm assuming you're using Nokia Web Tools, aren't you?

    https://www.developer.nokia.com/info...Web_Tools.html
    Pankaj Nathani
    www.croozeus.com

  12. #12
    Registered User ohill's Avatar
    Join Date
    Mar 2013
    Posts
    9
    Quote Originally Posted by croozeus View Post
    Where did you install the emulator from? I'm assuming you're using Nokia Web Tools, aren't you?

    https://www.developer.nokia.com/info...Web_Tools.html

    No, I'm using Java Tools (specifically the one with Nokia Asha 305 Emulator): http://www.developer.nokia.com/Devel...platform_SDKs/

  13. #13
    Nokia Developer Moderator croozeus's Avatar
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,649
    Quote Originally Posted by ohill View Post
    No, I'm using Java Tools (specifically the one with Nokia Asha 305 Emulator): http://www.developer.nokia.com/Devel...platform_SDKs/
    You should use Nokia Web Tools for S40 Web Apps. I was referring to the simulator provided by Nokia Web Tools.

    https://www.developer.nokia.com/info...Web_Tools.html
    Pankaj Nathani
    www.croozeus.com

Similar Threads

  1. Get user agent string during runtime
    By pixsta in forum Nokia N9
    Replies: 3
    Last Post: 2012-02-13, 17:44
  2. Getting user agent string...
    By shiva.n in forum Mobile Java Networking & Messaging & Security
    Replies: 19
    Last Post: 2010-08-26, 08:43
  3. User Agent String
    By mind_freak in forum Qt
    Replies: 2
    Last Post: 2010-04-06, 17:33
  4. User Agent String
    By shankx in forum Symbian Web Runtime
    Replies: 1
    Last Post: 2009-05-25, 08:31
  5. Nokia 7380: Incorrect User-Agent
    By knorring in forum Mobile Java General
    Replies: 1
    Last Post: 2006-06-03, 21:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved