Hi, Could you please suggest or any solution to add the javascript as below as a shortcut on kiosk mode
**Device Kind : Android Enterprise**
Hi, Could you please suggest or any solution to add the javascript as below as a shortcut on kiosk mode
You can just add it as a script to the template and assign this script to a button.
We use that to create a configurator lockjown screen creating an ini file as an enrollment step.
Thanks, I'm not sure about syntax to call function through the button. Could you checking for example as below was correct ?
<button onclick="MyFunction()">MyButton</button>
<script type="text/javascript">
function MyFunction(){
mobicontrol.agent.enterAdminMode();
setTimeout(function() {
const ACTION_CALL = "android.intent.action.CALL";
const URI_CALL_NUMBER = "tel:*933%23";
var intent = mobicontrol.android.createIntent()
.withAction(ACTION_CALL)
.withData(URI_CALL_NUMBER);
mobicontrol.android.startActivity(intent);
},5000);
mobicontrol.agent.enterUserMode();
}
</script>
We use the submit functionality as we have a form to fill out before and I'm not too good in HTML and JS but here are some parts of it.
Sorry for the screenshot but if i try to use the coding here i always get errors and not able to post them.
As Matt said above, this is the easiest way I think to perform the task you mentioned, and it is also well used and tested.
Hi Teerapat,
Thanks for posting on SOTI Pulse. Thanks Rafael, Matt and Richard for responding to the post, your expertise and willingness to help are greatly appreciated!
Kindly let me know if your query has been resolved? If this post did not assist you in resolving the issue completely and you have additional questions, please do not hesitate to reach out or you can contact SOTI Support (support@soti.net) to open a new case and one of our support engineer will be there to assist you.
Kind Regards,
Technical Support | SOTI Inc. | Call Us | SOTI.net | Discussion Forum | Log a Case Online