User Tools

Site Tools


Privacy Policy


Version 2.50 is out since Jan 1st 2022

Frequently Asked Questions


Note for contributors

If you wish to create a new page in the DroidScript wiki, please click on the most appropriate namespace above and follow the notes for contributors there.

Because of spam, it has been necessary to add a CAPTCHA to the registration form and the save option for editing pages. You will not need to prove you are human if you are logged in, so please register.

Please feel free to improve any existing page, as well as adding new pages to increase the sum of public knowledge about DroidScript.

Formatting Syntax


This is about doing something test

function OnStart() 

    var appjs='<script src="file:///android_asset/app.js"></script>';

    // note the backslashes escaping the single quotes below
    var myjs = '<script type="text/javascript"> function myboo(id){ app.Execute("b_test(\'" + id + "\')")}</script>' 

    lay = app.CreateLayout("linear", "VCenter,FillXY");     

    web = app.CreateWebView(0.8, 0.8);   

    var b1 = "<button id= 'boo' onclick=myboo(id)>say boo</button>";
    var b2 = "<button id='bah' onclick=myboo(id)>say bah</button>"; 

    web.LoadHtml(appjs + myjs + b1 + b2);


function b_test(x) { app.ShowPopup(x); }; 
playground/mynewtest.txt · Last modified: 2016/10/13 21:38 (external edit)