Version added 07-Mar-2018| Modified 04-May-2018
Let us understand some webOS-specific concepts.
Managing Web Apps
The webOS system provides the following app management services:
SAM (System and Application Manager) - Oversees the behavior of apps and manages each app throughout its lifecycle, including the installation, launch, termination, and removal of the app.
WAM (Web Application Manager) - Responsible for launching and managing web apps.
Packaging/Delivering Web Apps
In a webOS system, a web app can be packaged/delivered as follows:
Added in webOS image – The web app is built into the webOS image. This approach is used by platform developers to enhance the functionality of the platform. For details, see Creating a Built-in Web App.
Installed on webOS device – The web app is installed on the webOS target device. This approach helps 3rd party application developers to create web apps for webOS devices. For details, see Creating an Installable Web App.
Calling webOS Services in Web Apps
Web apps built for webOS devices can provide enhanced functionality by leveraging the APIs provided by webOS services. Let us understand this with a sample code that prints a hello message and also prints the current time on the console.
A brief explanation of the webOS-specific lines of code:
Line(23~35) : Define a JS script that calls the luna://com.webos.service.systemservice/clock/getTime method. If it succeeds, it prints the UTC value to console (/var/log/messages file on target).