×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    31

    flashlite api bridge - media management

    Hi

    Wondered if someone so chould help. I am trying to build a test version of an app that loads in a list of images on phone. However when I install and run the app it returns an error of -3. Now, i cannot for the life of me find any documentaion on what the errorcodes relate to:

    My AS code is below:



    -----------------------------------------------------------------------

    //Import APIBridge library
    import com.nokia.lib.Device;
    import com.nokia.lib.Service;
    import si.apibridge.*;

    var myDevice:Object = new Device();
    myDevice.DisableAutoRotation(true);


    var bridge:APIBridge = new APIBridge(onBridgeError);

    //Create a new media service
    var media = bridge.Service("Service.MediaManagement", "IDataSource");



    function callBack(transactionID:String, 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;
    text_txt.text += "-"+filename+"\r";
    } else {
    break;
    }
    } while (true);
    } else {
    var errorId = outParam.ErrorCode;
    text_txt.text = "Error code=: "+errorId;
    }
    }

    function getMedia()
    {

    var filter = {FileType:"Image", Key:"FileExtension", StartRange:".jpg"};
    // Define the input parameters
    var inParam = {Type:"FileInfo", Filter:filter};
    media.GetList(inParam,callBack);
    }






    function onBridgeError (outParam:Object) {
    trace("APIBridge error " + outParam.ErrorCode + " " + outParam.ErrorMessage);
    }



    media_btn.onRelease = function(){
    getMedia();
    }


    ------------------------------------------------------------------


    As a note. I am wrapping the flash up as a wrt and then packaging as a sis with api bridge within. Any ideas would be great. Testing on a n95 wiht latest firmware, exported out as flash lite 3.0

    cheers

    ade

  2. #2
    Registered User
    Join Date
    Feb 2010
    Posts
    31

    Re: flashlite api bridge - media management

    ok digging through the si package I have found the errorcode and error message which is:

    outParam.ErrorCode = -3;
    outParam.ErrorMessage = "Unable to open apibridge.token.txt";

    However, god knows how i try and resolve this? I assume it must be some kind of install issue?

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

    Smile Re: flashlite api bridge - media management

    Quote Originally Posted by kinski76 View Post
    ok digging through the si package I have found the errorcode and error message which is:

    outParam.ErrorCode = -3;
    outParam.ErrorMessage = "Unable to open apibridge.token.txt";

    However, god knows how i try and resolve this? I assume it must be some kind of install issue?
    According to my vision,a special token is assigned to the content (of Flash Lite, WRT or J2ME) by API Bridge when it runs for the first time.That token is automatically generated by API Bridge in the directory of the provided content with name apibridge.token (and extension .txt) . But yes due to some reasons the token is not generated sometimes and one gets this error. Try to install the latest version of API Bridge ,run widget sample (<APIBridge Directory>\WgzInstaller\content\APIBridgeTest.wgz) because once it solves this issue for me & then test ur swf file. First test ur swf file in standalone flash player then in the widget. Let me know if it is neither working for standalone nor for widget.

    Best Regards,
    SajiSoft

  4. #4
    Registered User
    Join Date
    Feb 2010
    Posts
    31

    Re: flashlite api bridge - media management

    Hi again.

    it also may be worth mentioned the following.

    When I have downloaded the apibridge example swfs (from nokia site) and installed and run on device:

    Only the apibridge capability swf seems to work...stating that apibridge proxy has been set up.

    The media management and photo capture swfs both fail with an error being outputted. This i guess suggests an issue with my api bridge install??? Or something else?

    thanks again

    ade

  5. #5
    Registered User
    Join Date
    Feb 2010
    Posts
    31

    Re: flashlite api bridge - media management

    Ok here is an update.

    I have tested the test wgz that comes with api bridge. That works fine pulls in image list as a test.

    I have tried a version of the swf as a standalone player installing in c:\data\others\trusted

    This fails with same token error as before.

    I have tried within a wgz and i get the same response.

    When I run a standalone swf a token txt file is created in the same directory.

Similar Threads

  1. Flash lite api bridge - capture image problem
    By kinski76 in forum [Archived] Flash Lite on Nokia Devices
    Replies: 4
    Last Post: 2010-02-22, 21:47
  2. Replies: 5
    Last Post: 2007-03-01, 14:52
  3. SIP content type
    By hlothman in forum Symbian Networking & Messaging (Closed)
    Replies: 8
    Last Post: 2006-05-17, 09:26
  4. Mobile Media API
    By anupamah in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2003-07-10, 08:38
  5. sound playing and recording in Mobile Media API
    By walterzcm in forum Mobile Java General
    Replies: 0
    Last Post: 2002-10-24, 05:22

Posting Permissions

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