Version 2.80 now available with SAF improvements and more!

261 views
Skip to first unread message

Dave

unread,
Sep 4, 2026, 5:11:28 AMSep 4
to DroidScript
Hi Guys,

Latest release here - https://droidscript.org/download/v2.80/

You'll notice I have 'snazzed up' the download pages and also renamed the 'X' version to 'Enterprise' as it seems more appropriate and it's also got nothing to do with what used to be twitter :)

Note: the 2.8x series will go into maintenance only mode now as we move towards the V3 official release.

DS 2.80.0
Fixed SAF file write truncation bug.
Fixed app.CreateShortcut bug in APKs.
Added new app.GetSafeArea() method with cutout and system option.
Fixed app.EnableBackKey(false) in Android 16 APKs.
Fixed Google Play warning about 16 KB memory page sizes.
Improved SAF support in all file handling functions.
app.ListPermissions( "all/internal/external/usb" ) now returns use-able URIs.

DS 2.79.2b
Updated ApkBuilder to target API 36.
Updated ApkBuilder to use Billing v8.


Ferhat

unread,
Sep 16, 2026, 11:30:17 AMSep 16
to DroidScript

Hi, I found a crash in the DroidScript WebView when using the HTML download attribute together with Canvas.toDataURL().

This simple code reproduces the issue:

<!DOCTYPE html>
<html>
<body>

<canvas id="canvas" width="500" height="300"></canvas>

<button onclick="downloadCanvas()">Download PNG</button>

<script>
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");

ctx.fillStyle = "red";
ctx.fillRect(50, 50, 200, 100);

function downloadCanvas() {
    const data = canvas.toDataURL("image/png");

    const a = document.createElement("a");
    a.href = data;
    a.download = "canvas.png";

    document.body.appendChild(a);
    a.click();
    document.body.removeChild(a);
}
</script>

</body>
</html>

When the button is pressed, the WebView freezes and the app is force-closed.

The same download approach is expected to work in a normal browser, so this appears to be related to the DroidScript WebView's handling of <a download> with a data URL generated by canvas.toDataURL();


4 Eylül 2026 Cuma tarihinde saat 12:11:28 UTC+3 itibarıyla Dave şunları yazdı:

Ferhat

unread,
Oct 5, 2026, 3:39:41 PM (4 days ago) Oct 5
to DroidScript

There seems to be an issue with app.Path2Uri(). It works perfectly fine within DroidScript, but after converting the project to an APK, app.Path2Uri() returns an empty result inside the app. I have an update that I need to release in a few days. Would fixing this issue take a long time, or is there an alternative method I could use?


16 Eylül 2026 Çarşamba tarihinde saat 18:30:17 UTC+3 itibarıyla Ferhat şunları yazdı:

Alan Hendry

unread,
Oct 5, 2026, 5:38:54 PM (4 days ago) Oct 5
to DroidScript
HI,
I get the same problem
Android 15, DS and builder 2.80
Regards, ah

_AddPermissions("extsdcard");
_AddPermissions("Storage")
function OnStart() {
  app.SetDebug( false )
lay = app.CreateLayout( "Linear", "VCenter,FillXY" )
txt = app.AddText(lay,"app.GetNavBarHeight() "+app.GetNavBarHeight())
txt = app.AddText(lay,"app.HasSoftNav() "+app.HasSoftNav())
txt = app.AddText(lay,"app.IsNavBarOnRight() " +app.IsNavBarOnRight())
// txt = app.AddText(lay,"app.HasNavBar() ",app.HasNavBar())
app.AddLayout( lay )
//  var file = app.GetAppPath() + "/" + app.GetAppName() + ".js";
//  app.SetClipboardText( file )
//  app.CreateShortcut( "Demo", "/Sys/Img/Icon.png", file );
  app.GetPermission( "extsdcard",OnPermission )
}
function OnPermission (pathURI) {
    uri = pathURI
    alert(uri)
    var folderName = uri.split("%3A")[1].replace("%2F", "/")
    path = app.GetInternalFolder()+"/"+folderName
    if (uri.search(/primary/i) ==-1) path = app.GetExternalFolder()+"/"+folderName
    if (uri.search(/dcim/i) >0) path = app.GetSpecialFolder("DCIM")
    if (uri.search(/pictures/i) >0) path = app.GetSpecialFolder("Pictures")
    if (uri.search(/movies/i) >0) path = app.GetSpecialFolder("Movies")
//    if (uri.search(/download/i) >0) path = app.GetSpecialFolder("Downloads")
    if (uri.search(/documents/i) >0) path = app.GetSpecialFolder("Documents")
    if (uri.search(/music/i) >0) path = app.GetSpecialFolder("Music")
    alert("path "+path)
    alert("Path2Uri "+app.Path2Uri( path ))
    alert("RealPath "+app.RealPath( path ))
    app.SetDebug( true )
    app.MakeFolder(  path+"/x" )
//    app.GetTempFolder()
    app.WriteFile(path+"/x/screenshot.txt" , "Screen Shot")
    app.ScreenShot( path+"/x/screenshot.jpg" );
}
Reply all
Reply to author
Forward
0 new messages