×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    3

    [moved] Problem launch application from widget

    Hi

    Im trying to launch the Facebook application from my widget, on a Nokia N97, with the following code:

    Code:
    try {
       var criteria = new Object();
       criteria.ApplicationID = "s60uid://" + uid;
       var result = serviceObj.IAppManager.LaunchAp p(criteria);
       if (result.ErrorCode != 0) {
          alert("Could not launch applicaiton. " + result.ErrorCode + ": " + result.ErrorMessage);
       }
    }catch(ex){
       alert("Start app failed. " + ex);
    }
    The uid = 0x2000dad6. But the call to IAppManager.LaunchApp(criteria) fails and gives me an exception: "Start app failed. TypeError: Null value"

    I have search the forum without any help. The Facebook widget starts without problem if I launch it from the program folder. I have also tried the Bloomberg application, with the same result.
    Last edited by johan@webinfostudio.se; 2009-09-14 at 09:25. Reason: Forgot to tell what phone I was using, N97

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

    Re: [moved] Problem launch application from widget

    Hi johan,

    your method correctly works for me (on a Nokia N97).

    Here's the code I've used:
    Code:
    function launchFacebook()
    {
    	try {
    		var uid = "0x2000dad6";
    		
    		var serviceObj = device.getServiceObject("Service.AppManager", "IAppManager");
    		
    		var criteria = new Object();
    		criteria.ApplicationID = "s60uid://" + uid;
    		var result = serviceObj.IAppManager.LaunchApp(criteria);
    		if (result.ErrorCode != 0) {
    		  alert("Could not launch applicaiton. " + result.ErrorCode + ": " + result.ErrorMessage);
    		}
    	}catch(ex){
    		alert("Start app failed. " + ex);
    	}
    }
    Just a guess: have you used quotes around your UID? As in:
    Code:
    var uid = "0x2000dad6";
    Pit

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    3

    Re: [moved] Problem launch application from widget

    Sorry I was stupid not to try only the launch method. Someone borrowed the N97 so I don't know if the code works but I think your correct. But I tried a Nokia XpressMusic and the code works on it so the error must be in my app when calling the launch method. The funny thing was that another application opens on the XpressMusic since there was no Facebook widget on the XpressMusic.

    I need to test if there some code in my app that can cause the error. By the way the uid comes from the GetList method searching for a matching application with the name asked for.

    One thing I know that we are using in the application is JQuery, but I dont think that should make any difference.

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

    Re: [moved] Problem launch application from widget

    If you retrieve the UID via the AppManager API, then it should be correct.

    About jQuery, its usage should make no difference in this case.

    Pit

Similar Threads

  1. Flash Lite stub application not able to launch content
    By Rohit_TB in forum [Archived] Flash Lite on Nokia Devices
    Replies: 2
    Last Post: 2009-09-08, 11:19
  2. [moved] SIS Intallation problem in Location Based Application
    By narendar_discover in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 13
    Last Post: 2009-09-08, 09:51
  3. [moved] Problem with starting application
    By paintstripper in forum Python
    Replies: 16
    Last Post: 2008-09-22, 19:44
  4. Problem in document handler application ...Plz help
    By gyan1982 in forum Symbian C++
    Replies: 3
    Last Post: 2007-01-17, 06:12
  5. Problem in compiling telephony application on ARMIB platform
    By abdg27 in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2004-03-16, 08:48

Posting Permissions

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