Hosted Web App
webOS TV app has two types. The packaged app is launched using the installed app resources on your webOS TV.
The hosted app is executed by URL redirection with a local dummy app on your webOS TV. The hosted app downloads app resources from a remote server and displays them on your webOS TV.
Because hosted (server hosted) web apps reside on a web server, you need to consider connectivity to a remote web server to serve the content of the apps successfully. However, you can update them at any time without having worry about pushing updates to the TV.
From webOS TV 4.0 SDK, CLI provides the hosted web app template. For more information about the template, see Creating a hosted web app template.
Redirecting the default web page of the hosted webOS TV web app to the default web page of the web app on the remote server.
The following example shows how to redirect the hosted webOS TV web app's index.html to the index.html of the web app the remote server.
<html> <head> <meta http-equiv="refresh" content="0;url=http://www.example.com/index.html"> </head> </html>
<html> <script>location.href='http://www.example.com/index.html';</script> </html>
You can change the default web page of the hosted web app from index.html to any other HTML file. In order to change the default web page of the hosted web app, modify the main property in the appinfo.json file of the hosted web app. For more information, see appinfo.json. You can also deploy the hosted web app on webOS TV emulator or LG Smart+ TV. See Deploying a Web App with CLI for more information.
For testing a hosted web app, Test URL apps are provided in the Smart World Content Store:
Test URL 1280 × 720
Test URL 1920 × 1080
The Test URL apps have the following limitations:
Debugging with the web inspector is not supported.
The app icon and the title cannot be verified.
For your understanding on the hosted app, you can download the sample code and its IPK file at the below link for free.
Result in the webOS TV Emulator
You can install the sample app and see the sample app result in the webOS TV emulator as below image.
Do's and Don'ts
Do change the URL for your application
Do check network connection again before testing