Skip to content

Commit

Permalink
fix: fix app not working
Browse files Browse the repository at this point in the history
  • Loading branch information
reisxd committed Aug 14, 2024
1 parent 103ae59 commit 0d44996
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tizenbrew-app/TizenBrew/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
break;
}

window.send({ type: "launch", package: `${moduleType}/${packageName}`, tvIp: webapis.network.getIp() });
window.send({ type: "launch", package: `${moduleType}/${packageName}`, tvIp: webapis.network.getIp(), isTizen3 });
var keys = selectedItem.getAttribute("data-keys");
if (appPath.startsWith("http")) {
if (keys.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion tizenbrew-app/TizenBrew/js/wsClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function onMessage(msg) {
}

setTimeout(() => {
send({ type: 'launch', package: `${moduleType}/${moduleName}`, tvIp: webapis.network.getIp() });
send({ type: 'launch', package: `${moduleType}/${moduleName}`, tvIp: webapis.network.getIp(), isTizen3 });
if (!tizenAppId) {
location.href = `${appPath}${args ? `?${args}` : ''}`;
}
Expand Down
2 changes: 1 addition & 1 deletion tizenbrew-app/TizenBrew/service/debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function startDebugging(port, adb_conn, ip) {
return attachDebugger(debuggerJson[0].webSocketDebuggerUrl, adb_conn);
}).catch(
e => {
if (attempts >= 5) {
if (attempts >= 10) {
global.currentClient.send(JSON.stringify({ type: 'error', message: 'Failed to connect to debugger.' }));
clearInterval(connectionInterval);
global.inDebug.tizenDebug = false;
Expand Down
7 changes: 2 additions & 5 deletions tizenbrew-app/TizenBrew/service/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ module.exports.onStart = function () {
}
case 'relaunchInDebug': {
setTimeout(() => {
const isTizen3 = tizen.systeminfo.getCapability('http://tizen.org/feature/platform.version').split('.')[0] === '3';
createAdbConnection(isTizen3, message.tvIp);
createAdbConnection(message.isTizen3, message.tvIp);
}, 1000);
break;
}
Expand Down Expand Up @@ -172,9 +171,7 @@ module.exports.onStart = function () {
}

if (module.tizenAppId) {
const isTizen3 = tizen.systeminfo.getCapability('http://tizen.org/feature/platform.version').split('.')[0] === '3';
// TODO: Get TV IP from os.networkInterfaces()
createAdbConnection(isTizen3, message.tvIp, module.tizenAppId);
createAdbConnection(message.isTizen3, message.tvIp, module.tizenAppId);
}
} else {
global.currentModule = {
Expand Down

0 comments on commit 0d44996

Please sign in to comment.