×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    9

    Platform Service API problem: not work while calling two services

    Hi all
    I tested with the Media Management Service API, and found a problem that if i call the service twice,the second call doesn't work.It works only when be called after the first call got results.
    So, is it impossible to do multiple calls at the same time,or there are something i am missing?

    I am using the asynchronous call.

    my code is here:

    import com.nokia.lib.Service;


    var media = new Service("Service.MediaManagement", "IDataSource");
    var filter = {FileType:"Music", Key:"FileExtension", StartRange:".mp3"};
    var inParam = {Type:"FileInfo", Filter:filter};


    media.GetList(inParam,onReceive1);
    media.GetList(inParam,onReceive2);



    //1st callback
    function onReceive1(transactionID:Number, eventID:String, outParam:Object) {
    if (outParam.ErrorCode == 0) {
    var outList = outParam.ReturnValue;
    var outputEntry = null;
    do {
    outputEntry = outList.next();
    if (null != outputEntry) {
    var filename = outputEntry.FileName;
    debug1.text+=filename+newline
    } else {
    break;
    }
    } while (true);
    } else {
    var errorId = outParam.ErrorCode;

    }
    }//callback.onLoad


    //2nd callback
    function onReceive2(transactionID:Number, eventID:String, outParam:Object) {
    if (outParam.ErrorCode == 0) {
    var outList = outParam.ReturnValue;
    var outputEntry = null;
    do {
    outputEntry = outList.next();
    if (null != outputEntry) {
    var filename = outputEntry.FileName;
    debug2.text+=filename+newline
    } else {
    break;
    }
    } while (true);
    } else {
    var errorId = outParam.ErrorCode;
    debug2.text+="error: "+errorId
    }
    }//callback.onLoad
    any idea?

  2. #2
    Registered User
    Join Date
    Apr 2008
    Posts
    9

    Re: Platform Service API problem: not work while calling two services

    Here comes another testing results:
    seems multiple call of service works for contacts service API.

    import com.nokia.lib.Service;

    var contact = new Service("Service.Contact", "IDataSource");
    var inParams = {Type:"Contact"};

    contact.GetList(inParams,onList1);
    contact.GetList(inParams,onList2);


    function onList1 (transactionID:Number, eventID:String, outParam:Object) {
    if (outParam.ErrorCode == 0) {
    var outList = outParam.ReturnValue;
    var outputEntry = null;
    do {
    outputEntry = outList.next();
    if (null != outputEntry) {
    var firstname = outputEntry.FirstName["Value"];
    //text field for testing,instance name:debug1
    debug1.text+=firstname+newline

    } else {
    break;
    }
    } while (true);
    } else {
    var erroId = outParam.ErrorCode;
    }
    }

    function onList2 (transactionID:Number, eventID:String, outParam:Object) {
    if (outParam.ErrorCode == 0) {
    var outList = outParam.ReturnValue;
    var outputEntry = null;
    do {
    outputEntry = outList.next();
    if (null != outputEntry) {
    var firstname = outputEntry.FirstName["Value"];
    //text field for testing,instance name:debug2
    debug2.text+=firstname+newline

    } else {
    break;
    }
    } while (true);
    } else {
    var erroId = outParam.ErrorCode;
    }
    }

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    1

    Re: Platform Service API problem: not work while calling two services

    Hi,
    Want to ask some question about this Service and why I can't list my contacts on my Nokia 5800.
    I use original code, I allow access to my data and application close. Is this problem in API or in my phone?
    I test to list my SMS and it works fine. Please give me some information to understand where is th mistake.

    Thank You.

  4. #4
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    Re: Platform Service API problem: not work while calling two services

    there were problems previously being discussed wrt to contacts listing. Reading previous thread might give u some pointers. But I would also advice u to update your Flash Lite version.
    Twitter - manikantan_k
    Just in --

Similar Threads

  1. Which FP1/FP" devices does Music Player Remote Control API not work on
    By kevinvernon in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2009-02-09, 12:17
  2. Cannot find where the issue is, Bluetooth service discovery
    By newbietoprofessional in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2008-07-14, 16:39
  3. Sen Service DB problem
    By Alex_judow in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2006-09-28, 12:41
  4. web services on symbian...problem won't be resolved!!!
    By ashrafabdoh in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2005-09-16, 14:59

Posting Permissions

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