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


DroidScript v1.42

Announcement by Dave Smart 2nd December 2016

Hi Guys,

It's been a while but we have finally got a new version for you. Yay! This one has Tons of great new functionality, most notably the following things:-

Sliding Drawers

You can now easily create professional looking apps by adding drag out menus and slide out panels with only a few lines of code. We've added a sample to demonstrate this called 'Drawer Menu'. There is also a new template available in the Wifi editor for creating this type of app. When combined with the FAB buttons in the UIExtras plugin you can easily create apps with the look and feel of Google Hangouts or Gmail.

Asset chooser

Although we recommend using the WiFi editor for 'serious' development with DroidScript, for those of you that don't have access to a Laptop or PC, we have now added an asset manager to the on-device editor, so you can more easily add pictures, videos and music files to your apps.

Downloadable Demos

Checkout the new 'Demos' menu in the app. This allows those without the WiFi editor to get at the downloadable demo SPKs which is a growing list of showcase apps that really demonstrate the power and capabilities of DroidScript. If you want to see your name up there and show off to your friends or future employers, then write a really cool demo and submit it to us for inclusion. Check out the recent submission from AlexF called 'Tankerous' (there's more to come from this talented young coder too:)

Download Manager and File Chooser

You can now make use of Android's built-in download manger by kicking off downloads that will be handled in the notification tray by the Android system, using the new app.DownloadFile() method. Also, you can now allow users to browse and choose local files using the nice built-in file chooser provided by Android using the app.ChooseFile() method. Check out the 'Choose' sample for a demo of this (this sample also shows how to choose contacts).

App Templates

For premium users, we have now provided a set of starting templates which are a suitable starting point for building professional quality apps, including the following types:-

Basic - The basic hello sample you already know. Background Service - A template for creating background services, the corresponding foreground app with communication between them. Web Server - A basic web server template that supports web sockets and bi-directional communication between client(s) and server. Multi-page with Menu Drawer - Designed for phones, provides starting point for apps with an action bar, drag-out menu and Material theme. Information Kiosk - Designed for Tablets, provides a skeleton kiosk type app suitable for information kiosks and industrial control panels

The 'Web Server' template gives you a good starting point for creating web servers out of Android devices and demonstrates fast web socket communications too. This sample would be a good starting point for building multi-player games or embedded IOT hubs, home automation and custom security systems.

We will be creating more templates for the next version of DroidScript, so let us know what you want.


There's absolutely loads of new features in this release including:- optional enhanced obfuscation, a new dark editor theme, new documentation for custom dialogs, web server and services, support for user extensions in Wifi editor, anonymous functions in callbacks, controls can now be enabled and disabled (greyed out), USB serial apps can now use our built-in packet collection with SetSplitMode, premium users can use SetKioskMode to block out Android system menus on KitKat and Lollipop tablets, your apps can now receive multiple file types using a new build.json file setting, margins and padding units can now be set using 'px','sp','dip','mm','pt', list controls can now be set to horizontal mode so that they look more like grids, the new Sys.In() and Sys.Err() methods allow terminal style access to the underlying Linux OS.

Phew!, that's been a lot of work… and there's even more, just check out the long list at the bottom of this post.

Special thanks go to Steve Garman and 'Chris Topher' for helping me to debug and improve this release.

This new version should appear in the next couple of hours on Google Play. If you simply can wait, then you can get it directly here:-

ALERT: This version contains a breaking change: You must now call dlg.Show() to show ListDialogs, YesNoDialogs and ListViews. Here are the changes since 1.34:-

  • Fixed bug with TextToSpeech failing to swap languages (eg. en_GB, en_IN).
  • Added touch callbacks to Absolute and Frame layouts.
  • Fixed freeze when trying to use SetPosition in Linear/Frame (now logs warning).
  • Added 'Web Server' template for premium users.
  • Fixed bug with List control showing images from /sdcard/Pictures folder.
  • Added 'Real' option to app.GetScreenWidth() and app.GetScreenHeight().
  • Added app.HasSoftNav() method (detects devices with soft navigation bar).
  • Files containing .min.js are not obfuscated.
  • Added 'UseBasicInput' option to webview (useful for html code editors).
  • Added web.SimulateKeys() method to webview (can send keys to html textarea)
  • Changed app.CreateListDialog() now requires call to dlg.Show() (or use 'ShowNow' option)
  • Changed app.CreateYesNoDialog() now requires call to dlg.Show() (or use 'ShowNow' option)
  • Changed app.CreateListView() now requires call to lvw.Show() (or use 'ShowNow' option)
  • Added SetOnCancel method to Downloader component.
  • Wifi IDE now lists prototype functions.
  • Added template apps to WiFi IDE for premium users.
  • Added docs for CustomDialogs, WebServer and Services.
  • Added 'Expand' option to list control (forces expansion to full height inside scrollers)
  • Added usb.SetMaxWrite() method and increased r/w buffers to 16k default.
  • Made premium samples visible.
  • Added support for NexBox/LeelBox mini Android TV boxes.
  • Added support for DS extensions in Wifi editor (add your own tabs).
  • Added AdjustColor() method to image controls.
  • Changed img.SetImage() with no params on old image maintains dimensions.
  • Added 'rescale' option on SetImage,LoadImage (forces resize of layout).
  • Added app.SetKioskMode() for premium users eg. SetKioskMode(“Status,Nav”,true,“Black”)
  • Added 'obfuscate' option to APK builder.
  • Added 'Dark Theme' option to DS settings.
  • Added new asset chooser to on-device code editor.
  • Added new downloadable demos page to DS menu.
  • Added app.GetThumbnail() method (gets a small image from a photo).
  • Added app.ScanFile() method (adds media files to phone gallery).
  • Release mode APKs now obfuscated more aggressively.
  • Added theme.SetTextEditOptions( “underline” ) option.
  • Added lay.SetOnChildChange() method to layouts (useful for auto-save).
  • Enabled anonymous functions in callbacks (use sparingly!)
  • Custom buttons now gray out when disabled.
  • Added ctl.IsEnabled() method to all controls.
  • Added usb.SetDataMode() and usb.SetSplitMode() methods.
  • Enabled calendar access through content app.QueryContent() method.
  • Added calendar query sample for premium users.
  • Added web.SetOnError() method, callback returns params:- errNum, errMsg, url.
  • Fixed tabs bug introduced in 1.35b.
  • Fixed short menu when starting in landscape mode.
  • Added 'engine' parameter to app.TextToSpeech method (allows swapping voices).
  • Added 'time' parameter to Locator (GPS) callback.
  • Added serv.Stop() method to web server.
  • Added Sys.In() and Sys.Err() method (reads console input and error streams).
  • Added cam.SetOrientation() and cam.SetPostRotation() methods.
  • Fixed issue causing Playstore dev console warnings.
  • Added 'stay awake' option to DS settings.
  • Plugins can now contain native .so files.
  • Added SetGravity() method to linear layouts (left,top,right,bottom,center,vcenter).
  • Added “ReverseLandscape” and “ReversePortrait” options to app.SetOrientation() method.
  • Added Linux “Terminal” sample for premium users.
  • Added app.PlayRingtone() method (“Alarm”, “Notification”, “Ringtone” ).
  • Added multiple pathPatterns support to build.json (eg. “.*\\.jpg,.*\\.txt”)
  • Added support for Android's sliding drawers.
  • Added 'Drawer Menu' sample.
  • Added app.DownloadFile() method (uses Android download manager).
  • Added .SetEnabled() method for all controls.
  • Added app.ChooseFile(“Choose a file”, “*/*”, OnFileChoose) method.
  • Added app.ChooseContact() method.
  • Added new “Choose” sample (get user to choose files or contacts).
  • Added support for Remix Mini (runs in desktop mode).
  • Added 'Launcher' sample (advanced sample for premium users only).
  • Added img.SetPixelMode method (allows use of pixel coords in drawing funcs).
  • Changed manifest to show running apps separately in task manager (can alt-tab on remix).
  • Added SetPosition() method and 'TouchModal', 'NoTouch', 'NoFocus' options to custom dialogs.
  • Added cam.SetVideoSize( width, height ) method.
  • Added new “Query Content” sample (advanced sample for premium users only).
  • Added result callback parameter to web.Execute() method.
  • Added 'Horiz' option to list control (makes title and body text flow horizontally)
  • Added lst.SetColumnWidths(icon,title,body) method to list control.
  • Added lst.SetIconSize() and 'inner' and 'outer' option to lst.SetTextMargins().
  • Add lst.SetIconMargins() method and 'Menu' mode to list control.
  • Added “px,sp,dip,dp,mm,pt” options to obj.SetSize() method.
  • Added 'mode' param to obj.SetMargins() and obj.SetPadding() (use: 'px','sp','dip','mm','pt').
  • Changed alarms in a service now call back to service unless 'App' used in SetAlarm() options.
  • Fixed rounding errors in image control (canvas) drawing methods.
  • Fixed bug which causes callbacks to get out of sequence.
  • Fixed full screen mode showing blank bar over softkeys on older devices.

Have fun!

Regards David

version_history/v1.42.txt · Last modified: 2018/07/22 22:01 (external edit)