Location of DroidScript files (and assets)

682 views
Skip to first unread message

Arie van Wingerden

unread,
Oct 22, 2018, 3:18:02 AM10/22/18
to DroidScript
Hi,

couldn't find how to add an asset. To my surprise drag'n dropping an image works fine. Nice :)

Now I'd like to create a background image for my app.

Somewhere I found that files would be located in /Sys/Img, however, this doesn't work.

Searching (from PC in Android file system) with hidden and system files enabled doesn't show my image either

So, how can I easily determine the location of scripts and assets?

TIA
/Arie

Arie van Wingerden

unread,
Oct 22, 2018, 3:31:27 AM10/22/18
to DroidScript
OK. Found answer by searching on the Android device.
Obviously I can't see all files via the PC :)

So, my image appears to be here:
   /DroidScript/KoperenKnop/koperenknop.jpg

but I need to reference it as:
   /sdcard/DroidScript/KoperenKnop/koperenknop.jpg

Steve Garman

unread,
Oct 22, 2018, 3:42:44 AM10/22/18
to DroidScript
If you ever intend to create an apk from your project, don't attempt to use absolute paths to read your assets.

In the case you hav there,
lay.SetBackground("koperenknop.jpg")
should find the file.

However, it is more usual to keep inages in the Img folder of the project and use
lay.SetBackground("Img/koperenknop.jpg")

That is where you would place them by putting the file in the Images section of the WiFi IDE which it sounds like is the editor you are using.

Steve Garman

unread,
Oct 22, 2018, 3:57:18 AM10/22/18
to DroidScript
In case it's not clear, when you have a project open in the WiFi IDE, you can switch between the code and the assets using the icons down the left.

I recommend dropping images in the Images section.

Screenshot 2018-10-22 at 08.49.38.png
Screenshot 2018-10-22 at 08.52.44.png

Arie van Wingerden

unread,
Oct 22, 2018, 4:26:20 AM10/22/18
to DroidScript
Thx Steve!
Just bought my premium version :)
Reply all
Reply to author
Forward
0 new messages