Home Page JavaScript Functions

You can find the JavaScript test page at https://www.android-kiosk.com/jstest.htm Just set this as the Kiosk URL on your device to test the functions.

Load Home Page
Load the homepage, requires version 1.45 or higher.

<script>
//LOAD KIOSK HOME PAGE - delete cache, history etc if enabled
function loadHomePage() {
Android.loadHomePage();
}
</script>
<a href="javascript:loadHomePage();">Load Home Page</a>


Get Home Page
Get homepage as specified in Kiosk Browser settings, requires version 1.45 or higher.

<script>
//GET KIOSK HOME PAGE (RETURNS STRING)
function getHomePage() {
return Android.getHomePage();
}
</script>
<a href="javascript:console.log(getHomePage());">Get Home Page URL</a>


Set Home Page
Set homepage as specified by string, requires version 1.50 or higher.

<script>
//SET KIOSK HOME PAGE
function setHomePage(url) {
Android.setHomePage(url);
}
</script>
<a href="javascript:setHomePage('http://www.android-kiosk.com');">Set Home Page</a>
Was this article helpful?
Thank you!