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