Reputation: 3742
We are in the process of developing an app for Samsungs Smart TV.
Is there a way to open a webpage in the browser from within our app?
Basically I am looking for something akin to Androids intent-mechanism. Setting location.href = "http://www.foo.com"
replaces my Apps DOM with the new page, which is not what I want. Looking through Samsungs API documentation I could not find anything related.
I also tried window.open
.
edit: I found a thread in the samsung developer forum linking to an oddly named method in the WidgetAPI. Someone in the thread says
So to launch WebBrowser, you need appID for that app.
Which I do not have.
edit2 this code opens a browser, but only the default page, not the passed one. I am still missing any documentation on how to pass a specific address.
new Common.API.Widget().runSearchWidget('29_fullbrowser','http://www.google.com');
Upvotes: 1
Views: 1985
Reputation: 344733
There's an undocumented member of Common.API.Widget
instances called runWebBrowser()
. I'm unsure how long it's been there, but the definition looks like this:
this.runWebBrowser = function(pURL, pKeyWord) {
var type = Common.API.EVENT_ENUM.RUN_WEBBROWSER ;
var data = curWidget.id + "|?|" + pURL + "|?|" + pKeyWord;
var widgetEvent = new WidgetEvent(type, data); // async call
sendWidgetEvent("", widgetEvent, false);
}
I've tested this on my 2013 Samsung Smart TV, and it works. The browser even gracefully restarts your app if the Return key on the remote is pressed.
Upvotes: 1
Reputation: 3742
Since I have found no solution yet and nobody seems to have one I'll answer my own question:
As of April 2013 this is not possible.
Upvotes: 1