User Tools

Site Tools


Sidebar

Privacy Policy

News

Version 2.50 is out since Jan 1st 2022


Frequently Asked Questions


Namespaces

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

sample_code:start

Sample DroidScript Code

Sample programs

Dice- This is a simple dice game.
Digital Clock- Shows Time and date.
DroidScript Console- Similar to command prompt in Windows.
Filter- This sample shows how to filter items in a list.
Battery Level- Shows Battery Level.
App Update - Check if an update for the app is available
Torch - This is a simple flashlight app.
Volume Box - You can view and adjust volume on your device
Backup Apps as Zip - Shows how to Backup your Appfolder as Zip file
Custom Buttons - Button Styles sample provided with DroidScript
CameraView Colour Effects - Demo available colour effects
Date Difference Displays the difference between two dates as Years, months days
Dialogbox - Sample how to create a simple Dialog
Drawing demo - Simple drawing demo
Draw smiley - Use Canvas Drawing Function To Draw A Smiley
Display /Sys resources - Show included images and sounds
Extra Keys - Help! It's really difficult to get to the curly braces on my keyboard!
File Picker - Sample for a Filepicker
Folder Picker - Sample for a Folderpicker
Get Device Infos - Send your Deviceinfos to clipboard
Decimal Values in a Textedit - Allows just decimal values in a textedit
Get Number in a Textedit - Test if a value in a Textedit is a number
Image Toggle Button - Take a image as toggle Button
Image Pixel - Show colour of touched pixel
Image array - store value of clicked rectangles in 2d array
Control an image - great sample by Dirk using image.DrawImageMtx
Image rotate - rotate x×y images using image.DrawImageMtx
Layout Children - Functions to manipulate controls on a layout
List of Entries - Show a list of entries (with add, update, delete, save, load)
Listing files on NXT - Sample app
Low Random File Acces - Sample and Infos from Dave Smart
Method finder - Introspection lite tool for home use by Steve Garman
Pincode - Excellent pincode entry facility with optional hidden input
Password Vault - Store your passwords (protected by FingerPrint scan and Master Password
Send App to Back - Sample how to send your App to the Background and restart it
Shake - Use accelerometer to detect device shaken
Use SimulateTouch - Sample to show how you can use the app.SimulateTouch method
Slide Menu - swipe to close
Unit Conversion - Simplistic unit-conversion demo
Visitor log - Full working example of a visitor sign-in log for my workplace
Web View - Simple webview demo
Load Webpage content - Shows how to load a webpagetext into a variable
Sample XMLHttpRequest - simple Roku remote demonstrates XMLHttpRequest
superuser on rooted device
shell access
list writeable mounted paths - List free space on mounted writeable paths
Using app.Execute - How to use app.Execute to get DS to respond to buttons/links etc in a Webview
Website File Check Service - Service to keep checking whether a file on a webserver has changed


Dialogs - ready to use

About Dialog - Show a simple Dialog to display some infos
Colorpicker - Pick a color and take the Hex-Colorcode result for formating or in your code
FontAwesomepicker - Pick a icon and take the name of it as text or in your code
New File Dialog - Show a dialog and create a new file in a folder
New Folder Dialog - Show a dialog and create a new folder in the path
Dialog for user input Get a string from the user
Custom Yes-No Dialog - Sample how to create a simple custom dialog, displayed if Back-Button is touched
Navigate Droidscript Databases First draft to navigate multidatabases, tables, columns and see values.


Snippets, Functions

Count List-Items - a function to count the items in a list-control
List Folders and Subfolders - All folders and subfolders in a list-control
Sort List - sort a List
Spinner GetSelectedItemNumber - Get the Number of the selected Spinner Item
Tab-Select - shows how you can select a Tab with an button command
Unzip Folders - a function to unzip folders to an path
JSON functions - Store objects in text files
TextEdit Search - Search for string in a TextEdit control
File Hex Viewer display a file in hex
Search search


Samples on the forum

Links to samples on the official DroidScript forum


Tips and Tricks

Note for contributors

If you wish to create a new page in the Sample Code namespace, please create a link to the new page above, save this page and click on the link you just created.

sample_code/start.txt · Last modified: 2022/07/24 16:49 by al4he6