summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAntia Puentes <apuentes@igalia.com>2020-08-06 18:36:33 +0200
committerAntia Puentes <apuentes@igalia.com>2020-08-07 21:48:27 +0200
commit1d589e87874bc53b582cd9c4bd8413773cf03fc4 (patch)
treeeaacb6f01b9fe3d91c97a491b6246f8a143c8f97 /src
parent4f171f533e8b63e2de11718116cbdde3f4ec8c1e (diff)
Launch background applicationjellyfish_9.99.3jellyfish/9.99.39.99.3
Bug-AGL: SPEC-3497 Signed-off-by: Antia Puentes <apuentes@igalia.com> Change-Id: I328f231e499d0473e9296f5d95678b5a1f2e88d6
Diffstat (limited to 'src')
-rw-r--r--src/config.json1
-rw-r--r--src/index.js4
-rw-r--r--src/js/background.js11
3 files changed, 15 insertions, 1 deletions
diff --git a/src/config.json b/src/config.json
index 5c1e8c2..fb94d9d 100644
--- a/src/config.json
+++ b/src/config.json
@@ -17,6 +17,7 @@
"icon": "fas fa-music"
}
],
+ "background": "webapps-html5-background",
"launch": "webapps-html5-launcher",
"network": {
"bluetooth": "fab fa-bluetooth-b",
diff --git a/src/index.js b/src/index.js
index 9d2cce0..8198355 100644
--- a/src/index.js
+++ b/src/index.js
@@ -22,8 +22,10 @@ import { api } from 'agl-js-api';
import * as app from './js/app';
import * as apps from './js/apps';
import * as time from './js/time';
+import * as background from './js/background';
window.apps = apps;
window.time = time;
api.init();
-app.init(); \ No newline at end of file
+background.load();
+app.init();
diff --git a/src/js/background.js b/src/js/background.js
new file mode 100644
index 0000000..38408ed
--- /dev/null
+++ b/src/js/background.js
@@ -0,0 +1,11 @@
+import { homescreen, afmMain } from 'agl-js-api';
+
+var configjson = require('../config.json');
+
+export function load() {
+ afmMain.start(configjson.background).then(function(result) {
+ console.log("loading background: " + result);
+ });
+}
+
+