Launching an app on the target

After you've installed your app's .bar file, you can launch your app.

If you don't have an HMI running on your target, you can still run your app from the command line.

To launch your app:
Run the launch script from the command line to start your app:

launch project_name

For example, launch BrowserLite.

The launch script creates all the files and folders the app needs in the application sandbox, and then runs the app on the target. You can see the files in the sandbox by looking at the app data directory located at /accounts/1000/appdata on your target image.

To launch the app, the Application Launcher service echoes a command containing the app's Application ID to the appropriate Persistent Publish/Subscriber (PPS) object:

echo "msg::start\ndat::application_id\nid::id_number" >
 /pps/services/launcher/control

Here, application_id is the app's name in the /apps directory and id_number is an arbitary string that identifies the message. For example, if the BrowserLite sample application was started, the application_id would be BrowserLite.testDev_BrowserLite353323d6 (you can determine this from the /apps folder) and an arbitary value identifying the message such as 1234 would be also sent. The full message would be:

echo "msg::start\ndat::BrowserLite.testDev_BrowserLite353323d6\n
 id::1234" > /pps/services/launcher/control

For information about Application Launcher and the PPS control object it uses, see launcher in the System Services Reference and /pps/services/launcher/control in the PPS Objects Reference.