×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    4

    Question API How to use the filter?

    Code:
    // Import Platform Service Interface
    import com.nokia.lib.Service;
    // Heading of the application
    heading_txt.text = "List Calendar entries";
    
    // Create a new Service object which has Calendar data
    var calender = new Service("Service.Calendar", "IDataSource");
    
    // Define input parameters
    var inParams = {Type:"CalendarEntry"};
    
    // Define result value
    var outParams = calender.GetList(inParams);
    if (outParams.ErrorCode == 0) {
         var outList = outParams.ReturnValue;
         var outputEntry = null;
         // Go through all calendar events and print them to the textbox on the
          // scene
       do {
            outputEntry = outList.next();
            if (null != outputEntry) {
               var id = outputEntry.id;
               text_txt.text += "-"+id+"r";
            } else {
               break;
            }
         } while (true);
    } else {
          var errorId = outParams.ErrorCode;
         text_txt.text += "Error: "+errorId;
    }
    That´s the original code which searches for the calendar entries but if i got to much entries the swf crashes... so i like to know how can i add the variables startRange and endRange in the input?

    var inParams = {Type:"CalendarEntry"};

  2. #2
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Re: API How to use the filter?

    Hi mkl23,

    I am unable to find any such filter in Calendar Service API in flash lite library which means that this feature is not implemented on Platform services side which limits the number of entries returned by Calendar GetList API. So, either live up with limitations or design ur own local server for extending flash lite in Symbian C++ or write a plugin for API Bridge in Symbian C++ .

    Best Regards,
    SajiSoft

  3. #3
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    100

    Re: API How to use the filter?

    Thats true.... I even tried with the Contacts API and it always crashed on Nokia 5800 device. There is not a single time when it showed me the results. Has any-one else successful in getting the contact details using API?

  4. #4
    Registered User
    Join Date
    Oct 2010
    Posts
    4

    Re: API How to use the filter?

    Hi!

    I used it in the following way ...

    Code:
    		var startRange : Date = new Date();
    		var endRange : Date = new Date();
    
    		....
    
    		var calender = new Service("Service.Calendar", "IDataSource");
    		var filter = {StartRange:startRange, EndRange:endRange};
    		var inParams = {Type:"CalendarEntry", Filter:filter};
    		var outParams = calender.GetList(inParams);
    		var outList = outParams.ReturnValue;
    		var outputEntry = null;
    		if (outList != null) {
    			do {
    			    outputEntry = outList.next();
    			    if (null != outputEntry) {
                                    ....
                                } else {
    			        break;
    			    }
    			} while (true);
                    } else {
                            ....
    		}

Similar Threads

  1. Replies: 2
    Last Post: 2008-09-30, 11:01
  2. URL filter
    By liuxingyu_best in forum Symbian
    Replies: 5
    Last Post: 2008-08-28, 10:02
  3. filter incoming sms on S60 3rd (silent filter)
    By kompotFX in forum Symbian C++
    Replies: 3
    Last Post: 2006-09-08, 08:01
  4. Problem with Authentication filter in HTTP Client API on Series 60 2.x
    By william_j in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2004-09-06, 13:15
  5. Filter API NOKIA serie 60
    By lucaudine in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2003-11-03, 08:08

Posting Permissions

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