×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    May 2009
    Location
    sydney
    Posts
    117

    Question get IMEI via PlatformService 2.0

    Hi,
    I'm sure there is a way to convert the following ServicePlatform 1.0 code to use the ServicePlatform 2.0 one? but how??


    Code:
    var systemServiceObj = null;
     
    // Called from the onload event handler to initialize the widget.
    function init() 
    {
    	try
    	{
            systemServiceObj = device.getServiceObject("Service.SysInfo", "ISysInfo");
        } 
    	catch (ex) 
    	{
            alert("System Service object cannot be found.");
            return;
        }
      	getIMEI();
    }
     
    // Device Informations
    function getIMEI()
    {
        // Initialize the criteria for the service object and obtain the
        // information
        var criteria = new Object();
        criteria.Entity = "Device";
        criteria.Key = "IMEI";
        try {
            var result = systemServiceObj.ISysInfo.GetInfo(criteria);
        }
    	catch (ex) 
    	{
            alert(ex);
            return;
        }
     
    	alert("IMEI: " + result.ReturnValue.StringData);
    }
    according to this,
    http://library.forum.nokia.com/index...1-6-1-4-1.html
    for the so definition, I've updated my code to "var so = nokia.device.load("sysinfo");", but still got errors when retrieving IMEI info.
    any advice will be appreciated..

    Chrs,
    Wen

  2. #2
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: get IMEI via PlatformService 2.0

    Hi Wen,

    If you have checked the platform services 2.0 closer you may have noticed that it is mostly a javascript wrapper around PS 1.0 to offer easier access to platform services. As you have already the JS code to retrieve the IMEI, I don't see any reason to try to get it working as PS 2.0 API. Basically the only way to convert it is to add your own abstraction layer to platformservices.js file, which I don't see feasible.

    Br,
    Ilkka

  3. #3
    Regular Contributor
    Join Date
    May 2009
    Location
    sydney
    Posts
    117

    Re: get IMEI via PlatformService 2.0

    Hi Ilkka,
    right, you are correct, basically there is no point to implement the same thing again by different api calling method, as long as the original one works, it's fine!
    the reason I ask this is for some reason one of my project got an error of "platform service not found ", which I was assuming the way to get the IMEI is not supported for those old n97 handsets, but down to the actual code of PS2.0, I know it's using the same method of calling now, so it's possible with few old N97/5800 handsets that still not well support 1.1 version of WRT I guess.

    thnx for your help
    Nokia is back!

Similar Threads

  1. HELP for getting IMEI
    By jotaneeya dipak in forum Symbian
    Replies: 4
    Last Post: 2010-01-19, 05:37
  2. IMEI no
    By bejoy_ak in forum Mobile Java General
    Replies: 4
    Last Post: 2009-11-05, 10:00
  3. Get info from IMEI? And can them fake IMEI?
    By kaglong in forum General Development Questions
    Replies: 7
    Last Post: 2009-04-23, 02:36
  4. IMEI
    By letiziad in forum Symbian
    Replies: 5
    Last Post: 2006-08-29, 10:25
  5. getting IMEI
    By badappleFG in forum Mobile Java General
    Replies: 1
    Last Post: 2003-02-21, 05:14

Posting Permissions

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