[英]Why does my Tizen Web App behave differently in debug mode?
In debug mode 在调试模式下
tizen.application.getCurrentApplication().getRequestedAppControl()
works like a charm. 奇迹般有效。 But in run mode my app chrashes at this line. 但是在运行模式下,我的应用程序在这一行崩溃了。
If you want to check for a launch request, use a try-catch block like following: 如果要检查启动请求,请使用try-catch块,如下所示:
function checkLaunchRequest() {
var appControl
, appOperation
, tmp
;
try {
appControl = app.getCurrentApplication().getRequestedAppControl().appControl;
appOperation = appControl.operation;
console.log("checkLaunchRequest operation: " + appOperation);
if (appOperation.indexOf("http://tizen.org/appcontrol/operation/view") !== -1) {
...Do something here...
}
} catch (err) {
console.error("Invalid launch request: " + err.message);
}
}
Also be sure you have set correct privilege in config.xml. 另外,请确保已在config.xml中设置了正确的权限。 You will need to set " http://tizen.org/privilege/application.launch ". 您将需要设置“ http://tizen.org/privilege/application.launch ”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.