简体   繁体   English

为什么我的Tizen Web App在调试模式下表现不同?

[英]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.

相关问题 为什么我的应用程序在发布模式下崩溃但在调试模式下不崩溃? - Why does my application crash in release mode but not in debug mode? 为什么Android调试模式会删除我的应用程序首选项? - Why does Android debug mode delete my application preferences? 为什么我的 Flutter 应用程序在发布模式下崩溃而在调试模式下运行良好? - Why is my flutter app crashing in release mode and working fine in debug mode? Tizen可穿戴式Web窗口小部件可见性更改和调试 - Tizen Wearable Web Widget visibilityChange and Debug 使用Visual Studio调试Tizen移动应用 - Debug Tizen mobile App with visual studio 我的应用程序在调试模式下工作得很好,但在ad hoc模式下则不行 - My app works perfect in debug mode but not in ad hoc mode 为什么在调试器下Perl的quotemeta()函数表现不同? - Why does Perl's quotemeta() function behave differently when under the debugger? 为什么删除操作符会在调试模式下导致调试断言失败? - Why does delete operator causes Debug Assertion Fail in Debug Mode? 附加到流程是否会使它的行为有所不同? - Does attaching to a process make it behave differently? 为什么当我保存 a.xhtml 文件(在调试模式下)时,Eclipse 继续取消部署我的整个 WAR 文件? - Why does Eclipse keep undeploying my entire WAR file when I save a .xhtml file (in debug mode)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM