1

In debug mode

tizen.application.getCurrentApplication().getRequestedAppControl()

works like a charm. But in run mode my app chrashes at this line.

1
  • 1
    Have you tried to call them seperatly in order to get the function call that causes the error?
    – sschrass
    Feb 4, 2016 at 8:55

1 Answer 1

1

If you want to check for a launch request, use a try-catch block like following:

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. You will need to set "http://tizen.org/privilege/application.launch".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.