×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    13

    Launching the youtube app

    Is there a way to launch the s60 youtube app from another application.

    I am working on a widget with an rss feed for a website.

    the articles sometimes have youtube videos and I would like to be able to open that video in the youtube application...or if that can't be done or the user doesn't have it installed, launch the browser and go to the mobile page.

    At the moment it doesn't even acknowledge there is a video there. Im assuming it's just a basic rss reader (im using the one from the wizard)

  2. #2
    Super Contributor
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Launching the youtube app

    Well the launching is the easy part. The following code lists applications on the device and you can launch them just by UID.

    Problems start when you try to pass parameters to the application. As the youtube application is 3rd party application I cannot really help with parameters. If the You Tube app you are referring to is a widget then there is no way to send the parameters.

    So what you could do is to parse the video id from the rss stream and then from the widget call
    Code:
    widget.openURL("http://m.youtube.com/watch?gl=US&client=mv-google&hl=en&v=THEVIDEOID");
    Please check the correct use of the URL parameters from some You Tube documentation.

    Code:
    function init(){
    	var so = device.getServiceObject("Service.AppManager", "IAppManager");
        
        
        var criteria = {
            Type: "Application"
        }
        
        var result = so.IAppManager.GetList(criteria);
        
        
        alert(result.ErrorCode);
        
        //var app =result.ReturnValue.getNext();
        var app = null;
        while (app = result.ReturnValue.getNext()) {                    
            document.body.innerHTML += "<input  type='button' value='"+app.Caption+" "+app.Uid+"' onclick='launch("+app.Uid+");'/><br>";
        }
        
    }
    
    function launch(uid){
    		
    		widget.openApplication(uid,"");
    }
    -Ilkka

Similar Threads

  1. Replies: 2
    Last Post: 2010-08-30, 12:03
  2. Launching a GUI app from a console app
    By sumeet_netsmartz in forum Symbian
    Replies: 9
    Last Post: 2009-09-01, 12:31
  3. Launching an app
    By Lorton in forum Symbian
    Replies: 0
    Last Post: 2003-03-07, 08:53
  4. Launching an app from pJava..
    By krajag in forum PersonalJava
    Replies: 0
    Last Post: 2002-10-10, 19:57
  5. Replies: 2
    Last Post: 2002-07-02, 05:53

Posting Permissions

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