Skip to content

Commit

Permalink
fix: fix launch app control and service autolaunch
Browse files Browse the repository at this point in the history
  • Loading branch information
reisxd committed Aug 19, 2024
1 parent 892c355 commit 2d7dc0d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tizenbrew-app/TizenBrew/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="https://tizentube.vercel.app" version="1.3.3" viewmodes="maximized">
<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="https://tizentube.vercel.app" version="1.3.4" viewmodes="maximized">
<access origin="*" subdomains="true"></access>
<tizen:app-control>
<tizen:src name="index.html" reload="disable"/>
Expand Down
4 changes: 2 additions & 2 deletions tizenbrew-app/TizenBrew/js/wsClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function onMessage(msg) {
const autoLaunchService = JSON.parse(localStorage.getItem('autoLaunchService'));

if (autoLaunchService) {
send({ type: 'startService', package: autoLaunchService });
send({ type: 'startService', package: `${autoLaunchService.type}/${autoLaunchService.name}` });
}

if (message.appControlData) {
Expand Down Expand Up @@ -174,7 +174,7 @@ function onOpen() {
const moduleType = parsedData.moduleType;
const args = parsedData.args;
// Send the data to the server and launch it after TizenBrew relaunches.
send({ type: 'launchAppControl', package: { name: moduleName, type: moduleType }, args });
send({ type: 'launchAppControl', package: `${moduleType}/${moduleName}`, args });
} catch (e) {
send({ type: 'getDebugStatus' });
}
Expand Down
1 change: 1 addition & 0 deletions tizenbrew-app/TizenBrew/service/serviceLauncher.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function startService(module, pkg) {
});

sandbox['require'] = require;
sandbox['tizen'] = global.tizen;
sandbox['module'] = { exports: {} };
fetch(`https://cdn.jsdelivr.net/${pkg}/${module.serviceFile}`)
.then(res => res.text())
Expand Down

0 comments on commit 2d7dc0d

Please sign in to comment.