[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[node8-android] Building the application image

A node8-android application has a s8 snapshot embedded as an asset.
To build the s8 snapshot we use s8 console platform and script files in s8 subfolder.

This process provides a modular building and also the ability to dynamically change the deployed s8 system.

Files and structure

At Android Studio project level we have s8 subfolder containing sources to build our s8 snapshot
For instance:
cd \Android\node8\s8
\C\v8\s8\release\s8vm.exe --expose-gc --shell app.js build.js
\C\v8\s8\release\s8vm.exe --expose-gc --shell appS8.js build.js
In this case we have two Android apps in the project: app and appS8.
The files app.js and appS8.js define constants for building process of both apps.

For example, in appS8.js we have:
// Settings to build application image
applicationSources = "sources/appS8/build.st";
assetsPathName = "../appS8/src/main/assets/";
snapshotPathName = assetsPathName+"default.snapshot.js";
That depict:

build.js defines the process to build all node8 applications

Building the snapshot

  1. Add your s8 code in \s8\sources\ and edit __rebuild.bat in the same folder to include your app.
  2. The s8 snapshot will be built and included as an asset of your Android application.
  3. Generate your application apk and deploy it to the Android device.