×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Nokia Developer Expert
    Join Date
    Feb 2008
    Posts
    29

    Is that possible to get the phone model in WRT?

    Is that possible to get phone model in WRT widget? Seems the User-Agent doens't work, it's Safari.

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    Warsaw, Poland
    Posts
    104

    Re: Is that possible to get the phone model in WRT?

    Hi,

    You may find the name of the device in JS's 'navigator.userAgent'. My simple widget shows on N95-8GB: "Mozilla/5.0 (SymbianOS/9.2; Series60/3.1 NokiaN95_8GB/15.0.015; Profile/MIDP-2.0 Configuration/CLDC-1.1 U; ) AppleWebKit/413 (KHTML, like Gecko) Safari/413" (similar results you get on 3rd ed. FP2 and 5th ed. emulators). When you know the pattern, you only need to parse this string.

    Weird things comes when you check 'navigator.appName' string ('Netscape') and 'navigator.appVersion' ('7' on 3rd. ed. FP2, '5' on 5th ed. emulator)


    BTW, there's always a way to access almost everything... you may write a simple local server (e.g. in C++ or Python) that will provide such type of information and then access it from your widget e.g. via HTTP and your own protocol.

    BR,
    Jacek
    Last edited by jack44; 2008-12-09 at 15:27. Reason: after some testing...

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    6

    Re: Is that possible to get the phone model in WRT?

    Quote Originally Posted by widsets View Post
    Is that possible to get phone model in WRT widget? Seems the User-Agent doens't work, it's Safari.
    Hi,

    You can use Platform Services to retrieve device information.

    code snippet:

    var so = device.getServiceObject("Service.SysInfo","ISysInfo");
    var criteria = {
    Entity: Device,
    Key: PhoneModel
    };
    var result = so.ISysInfo.GetInfo(criteria);

    if( result.ErrorCode == 0 )
    var phoneModel = result.ReturnValue;

    refer http://library.forum.nokia.com/index...6BF_cover.html

    ~AJ

Similar Threads

  1. Nokia Gamer (GamR) - concept phone
    By tgm91 in forum General Development Questions
    Replies: 4
    Last Post: 2008-10-01, 21:34
  2. How to determine Phone Model on http-server
    By Mr.Y in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2008-03-29, 13:18
  3. where I can ask for plans about a phone model
    By carabutnicu in forum General Development Questions
    Replies: 2
    Last Post: 2007-04-28, 18:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •