A Window On Your Content

From the Blog


Javascript Interfacing

Posted by ScaredyCat on February 14th, 2012 at 1:39 pm

As well as using Kiosk Browser SE’s ability to use css,html5, transitions etc, you also have access to a number of features that allow you to interface with Kiosk Browser SE from Javascript. These features allow you to do things like run installed applications or disable the configuration menus. Some of the features available are:

Show the Preferences or Platform Settings screens:

<input onclick="Kiosk.showPreferences(); return false;" type="button" value="Show Preferences screen" />
<input onclick="Kiosk.platformSettings(); return false;" type="button" value="Show Platform Settings" />

Clear the browser cache, any form data and history:

<input onclick="Kiosk.clearCaches(); return false;" type="button" value="Clear cache, form data, history" />

You can control the browser’s forward, back, reload and stop features:

<input onclick="Kiosk.goBack(); return false;" type="button" value="Back" />
<input onclick="Kiosk.goForward(); return false;" type="button" value="Forward" />
<input onclick="Kiosk.reload(); return false;" type="button" value="Reload" />
<input onclick="Kiosk.stop(); return false;" type="button" value="Stop" />

Disable or enable the menus

<input onclick="Kiosk.disableMenus(); return false;" type="button" value="Disable Menus" />
<input onclick="Kiosk.enableMenus(); return false;" type="button" value="Enable Menus" />

Disable or enable scaling

<input onclick="Kiosk.disableScaling(); return false;" type="button" value="Disable Scaling" />
<input onclick="Kiosk.enableScaling(); return false;" type="button" value="Enable Scaling" />

Show the user toast messages

<input onclick="Kiosk.showToast('Hello Android!'); return false;" type="submit" value="Android app interface" />

Show or hide the title bar

<input onclick="Kiosk.hideTitlebar(); return false;" type="button" value="Fullscreen" />
<input onclick="Kiosk.showTitlebar(); return false;" type="button" value="With title" />

Cause the application to restart itself

<input onclick="Kiosk.endApp(); return false;" type="button" value="Restart" />

Launch other applications that are installed

<input onclick="Kiosk.launch('fm.last.android','fm.last.android.LastFm'); return false;" type="button" value="Launch" />
<input onclick="Kiosk.launch('fm.last.android-1','fm.last.android-1.activity.Profile_RadioTab'); return false;" type="button" value="Launch 2" />

2 Responses to Javascript Interfacing



  2. How do you start an app directly using the Start URL?

    You have commands via a button in a web page.

    • Andrew,

      here are some examples:

      Value="Launch Barcode Scanner">


      'fm.last.android.LastFm'); return false;" >

      the first parameter to Kiosk.launch is the application package name, the second is the activity within that application that you wish to start.