0

I'm trying to open an url in browser in Mobicontrol Messagebox when pressing the YES dialog button. It allows for some very basic javascript / Mobicontrol API scripting. https://www.soti.net/mc/help/javascriptapi/en/index.html

But so far I had no succes, so was wondering if perhaps anyone knows a very basic javascript function to run an intent/scheme...or something like that.

So far variations of things I used was:

mobicontrol.message.createYesNoDialog('Would you like to open https://google.com ?')
.withCallback(onConfirm).show();

function onConfirm(result) {
if (result.isYesButton) {
mobicontrol.log.info('The Yes button was clicked');
OpenURL();
}
else if (result.isNoButton) {
mobicontrol.log.info('The No button was clicked');}
else if (result.isDismissed) {
mobicontrol.log.info('The dialog was dismissed');}
}

function OpenURL() {
mobicontrol.app.Activity('https://google.com#Intent;action=android.intent.action.VIEW;end');
}

I've also seen a lot of examples of window.open but the API doesn't seem to understand that yet.

Weasley
  • 17
  • 3

0 Answers0