×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    7

    Smile read SMS problem!!!

    1.Why is this code read SMS cannot descending order?

    2.I want to read text messages to the latest date first in the front

    thank you


    function readInbox(){

    try {
    var so = device.getServiceObject("Service.Messaging", "IMessaging");
    } catch(e ) {
    alert("Error in getting Messaging interface \n" + e);
    return;
    }


    // Our criteria is to get inbox SMS messages.
    var criteria =new Object();
    // Specifies the type of messaging objects to retrieve.
    // Possible values "Inbox", "NewMessage" etc..
    criteria.Type ="Inbox";
    criteria.Sort =new Object();
    criteria.Sort.Key="MessageId";
    criteria.Sort.Order ="Descending";
    criteria.Filter=new Object();
    criteria.Filter.MessageTypeList=["SMS"];


    // Lets get the messages with the above prepared criteria, synchronously.
    var result = so.IMessaging.GetList(criteria);

    // Lets print the received message list in html page.
    var items = result.ReturnValue;
    var message = "";
    var list = "";
    while (( message = items.getNext()) != undefined ){
    list += "<b>"+message.Sender+"</b> -- "+ message.Subject+"<br/>"+message.Time +"<br/><br/><hr/>";
    }

    document.getElementById('log').innerHTML += list;

    };

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: read SMS problem!!!

    Hi zhyzdl,

    please avoid double posting. Refer to your original thread:

    http://discussion.forum.nokia.com/fo...ad-SMS-problem!!!

    Pit

Similar Threads

  1. read SMS problem!!!
    By zhyzdl in forum Symbian
    Replies: 2
    Last Post: 2011-05-30, 16:51
  2. Question: can OTA SMS (WBXML binary) be read by SMS API
    By paipeng in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2009-02-20, 15:36
  3. Replies: 5
    Last Post: 2009-02-20, 12:23
  4. How to detect new unread sms and read the sms
    By exlim in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2008-05-28, 08:22
  5. Replies: 2
    Last Post: 2007-04-17, 12:00

Posting Permissions

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