×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    3

    Network System Attributes getInfo() and getNotification() possible bug?

    Hello,

    I have writen some code around the Web Runtime environment Platform Services 1.0 JavaScript API, and think that I found a bug or something that. In fact, I use the Nokia Web Developer Environment version 3.0.1, and write something like this to reproduce the error:

    Code:
      var
        so = device.getServiceObject( 'Service.SysInfo', 'ISysInfo' );
    
      function testGetInfo()
      {
        so.ISysInfo.GetInfo
        (
          {
            Entity : 'Network',
            Key : 'CurrentNetwork'
          },
          function( transId, eventCode, result )
          {
            // Here is the problem!
            console.info( result.ReturnValue );              
          }
        );    
      }
      
      function testGetNotification()
      {
        var ref = so.ISysInfo.GetNotification
        (
          {
            Entity : 'Network',
            Key : 'CurrentNetwork'
          },
          function( transId, eventCode, result )
          {
            // Here is the problem!
            console.info( result.ReturnValue );              
            
            // Cancel the transaction
            // so.ISysInfo.Cancel({ TransactionID : ref.TransactionID });
          }
        );
      }
      
      testGetInfo();
      
      testGetNotification();
    Please, take attention to the commented lines "Here is the problem!" in the above code. In fact, the documentation said that "ReturnValue" contain here a property "NetworkInfo", that itself contain an object with the network information. But this is not true: the "ReturnValue" contain itself the "NetworkInfo" object properties, not a property with this name pointing to this.

    In other words (sorry for my english, but maybe the bellow code explain the problem better) see this other code that work like a charm, just like the documentation said:

    Code:
      function goodGetInfo()
      {
        so.ISysInfo.GetInfo
        (
          {
            Entity : 'Battery',
            Key : 'batteryStrength'
          },
          function( transId, eventCode, result )
          {
            console.info( result.ReturnValue.Status );              
          }
        );    
      }
      
      goodGetInfo();
    In the above code you can see that the "ReturnValue" dont have the value that we looking for, but this is placed onto the "Status" property of "ReturnValue". Well, this is the same in all the mayor System Attributes in the API, some use the "Status" property, other use "StringData", "DriveList", "DriveInfo", etc.

    I found that when you request the "Network > CurrentNetwork" combination all "GetInfo()" and "GetNotification()" fails, in the manner that I commented above: the "ReturnValue" not contain the "NetworkInfo" property (like the documentation said) but contain itself the network information.

    Please, sorry my bad english. If cannot undertandme or need more information... feel free to write a response to this message! In cany case thanks very much for your patience!
    Last edited by davidesperalta; 2010-11-16 at 19:12.

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

    Re: Network System Attributes getInfo() and getNotification() possible bug?

    what handsets do you expect this code would work on?
    Nokia is back!

  3. #3
    Registered User
    Join Date
    Nov 2010
    Posts
    3

    Re: Network System Attributes getInfo() and getNotification() possible bug?

    I test the code only in the emulator provided with the Nokia Web SDK. I think that is a bug, because I have writen some code around the API 1.0 and not found any other similar case. In any case, I study now the API 2.0 and think that is a more better choice, so... anyone still use the API 1.0 version?

  4. #4
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Network System Attributes getInfo() and getNotification() possible bug?

    Hi,

    I will take a look into this and forward comments to the documentation team. There is one similar issue with this API regarding to getting active connection list, where the returned object depends on phones current network status.

    http://wiki.forum.nokia.com/index.ph...n_a_WRT_widget
    Code:
      //if wlan connection is made in offline mode, we get just conninfo object and not the list
            if(result.ReturnValue.ConnectionList){
    	    connInfo =  result.ReturnValue.ConnectionList.getNext();			
    	}else{
                connInfo = result.ReturnValue;
    	}

  5. #5
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Network System Attributes getInfo() and getNotification() possible bug?

    Hello,

    "ReturnValue" contain here a property "NetworkInfo"
    Actually could you point me to the page where that has been said?

    Only reference which I could find is as follows:
    http://library.forum.nokia.com/topic...77140A60D.html

    "Output specifies the system data type for an output value. The properties specified for a particular data type are used as the ReturnValue properties in method output.".

    That would mean that the API and documentation are in sync. However there is so much text in documentation, that I may have not spotted the erroneous sentence.

    Br,
    Ilkka

  6. #6
    Registered User
    Join Date
    Nov 2010
    Posts
    3

    Re: Network System Attributes getInfo() and getNotification() possible bug?

    Hello,

    I can read this in the page "Supported system attributes (entities and keys)" included in the documentation of the Nokia Web Developer Environment 3.0. I cant link this but think that you can found searching for the page title. Aparently also in the web documentation exists the same "problem". Follow this link and see in the "Network system attributes" table.

Similar Threads

  1. GetNotification - SysInfo Service API
    By shankx in forum Symbian
    Replies: 5
    Last Post: 2009-06-12, 12:22
  2. How to get cellid with Getinfo methos?
    By mehraj123 in forum Symbian
    Replies: 4
    Last Post: 2009-06-02, 06:45
  3. Replies: 8
    Last Post: 2008-09-16, 09:10
  4. Which System attributes can be accessed
    By Rameshwari in forum Mobile Java General
    Replies: 1
    Last Post: 2006-06-22, 11:01
  5. Bug or not Bug with Nokia 6170 : Network problem
    By mouldnadif in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-02-24, 14:31

Posting Permissions

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