Note
For more details on the above procedure, refer to Developing Downloadable Web Apps.
For more details on the above procedure, refer to Developing Downloadable Web Apps.
June 11, 2020
Author: NERGI
Since version 2.0.0, webOS OSE has been supporting a dual display feature. Thanks to that feature, a user can select an output display of a webOS OSE app.
For those who want to try out the feature on webOS OSE, this guide introduces a sample app which can select the output display.
To install the app, first you have to clone the repository.
$ git clone https://github.com/Heeam-Shin/web-app-controller-sample.git
$ cd web-app-controller-sample
The installation procedure is the same as that of a web app. Type the following commands:
$ ares-package .
$ ares-install ./com.dual.webapp.sample_1.0.0_all.ipk -d [your-target-device]
If the installation succeed, the app card of the installed sample appears in Home Launcher.
Then click the app card to launch the sample app. You can launch/close the built-in YouTube app by clicking the Launch / Close buttons, respectively.
This section explains the codes which are directly related to usage of LS2 API rather than explaining the whole codes.
|
|
A brief explanation of the above file:
|
|
It’s a pretty basic HTML code. A brief explanation of the above file:
onclick
event.In this file, openApp()
function calls the launch
method and closeApp()
calls the close
method using the WebOSServiceBridge API. Both openApp()
and closeApp()
use the WebOSServiceBridge API in a similar way. So I’ll only explain how openApp()
makes use of the API only.
|
|
A brief explanation of the above file:
WebOSServiceBridge
object.url
, params
). You can use various LS2 APIs by changing parameters of the call
method.Contents