From 1d589e87874bc53b582cd9c4bd8413773cf03fc4 Mon Sep 17 00:00:00 2001 From: Antia Puentes Date: Thu, 6 Aug 2020 18:36:33 +0200 Subject: Launch background application Bug-AGL: SPEC-3497 Signed-off-by: Antia Puentes Change-Id: I328f231e499d0473e9296f5d95678b5a1f2e88d6 --- src/config.json | 1 + src/index.js | 4 +++- src/js/background.js | 11 +++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/js/background.js 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); + }); +} + + -- cgit 1.2.3-korg