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

getting_started:faq

This is an old revision of the document!


Frequently Asked Questions

This faq is expected to grow significantly over time. Please feel free to add to it or correct any mistakes.

How do I set an icon for my app?

To see a personalized icon for your script in the program overview of DroidScript, place a .png file as asset in the folder Img with exactly the same name as your script.

e.g. if your script is called “MyApp” the icon should be “MyApp.png”.

The easiest way to do this uses the Wifi Ide but it can also be done directly on your phone/tablet using your file-manager.

What is an SPK and how do I use it?

An SPK is a DroidScript package. An SPK file is generated automatically by the DroidScript app when you share your app. To create an SPK file, long press on your script from the main DroidScript screen and select “Share via Email”. You can either proceed with sending the SPK to yourself or someone else via email, or cancel and browse the Android filesystem to get at your SPK file. The SPK will be located in the .DroidScript/Temp directory.

To use an SPK, you need to import it into DroidScript. Once you've got the SPK, Long press on it. Then share it to DroidScript. Wait for a Second or two, A dialog Box will appear whether you trust the source or not. Press yes. SPK will be created and you can see app.

How can I get the Display Size?

I am trying to get the width and height (in pixels) that I have available to work with in the application. Is there a way to get the values?

Have you tried using app.GetDisplayWidth() & app.GetDisplayHeight()? These should return the width and height of the screen available to your app in pixels (excluding the notification bar at the top of the screen).

Can I use an anonymous function as a callback?

I am trying to use an anonymous function in a button event handler:

btn.SetOnTouch(function({myCallback(arg1,arg2...)}))

to pass arguments to the callback, but it doesn't work.

Sorry, DroidScript does not support anonymous functions as callback parameters.
This is due to a limitation within the Android WebView→Java bridge.

How Do I Implement In-app-purchases in my DroidScript app?

getting_started/faq.1428681064.txt.gz · Last modified: 2015/04/10 23:51 (external edit)