sd on external usb stick

121 views
Skip to first unread message

Matteo De vita

unread,
Sep 8, 2022, 4:29:21 AM9/8/22
to DroidScript
I'm writing an application to create gcode from images to print them on a home made laser plotter. to print I have two possibilities: 
send the single commands one by one to the plotter
transfer the gcode to a usb stick to transfer it at once.
the second solution avoids keeping the device busy for a very long time.
my problem is that I can't identify the sd on the stick using the app.GetExternalFolder () function; which gives me the null value 
do you have any suggestions or advice? thank you all Matteo

Alan Hendry

unread,
Sep 8, 2022, 12:31:57 PM9/8/22
to DroidScript
HI,
"
I'm able to write files/folders to a USB drive after giving permission using GetPermission/OnPermission/CheckPermission etc. 
as per sample app 'Sdcard Access'  
"
Regards, ah 

Matteo De vita

unread,
Sep 9, 2022, 2:57:51 AM9/9/22
to DroidScript
Thanks for the info
I tried the 'Sdcard Access' example but it doesn't work, it doesn't give any error reports but it doesn't write the test file on the external card.
Could it be that the management of external sd is reserved for the premium level? I think this because the link you posted is in the premium area.
thank you
Greetings
Matteo

Alan Hendry

unread,
Sep 9, 2022, 5:40:18 AM9/9/22
to DroidScript
HI,
DS 2.51b1(02-Mar-2022)
app.ListFolder() now supports SAF (can list outside scoped storage).
DS 2.51a1(Feb-2022)
- Added support for /Internal/ and /External/ SAF paths.
- app.GetPermission() now supports 'external' and 'internal' keywords.
- Replaced 'Sdcard Access' sample with 'Storage Access' sample.
DS 210b1(20-May-2021)
External storage access (SAF) is now available to non-premium users.
DS 1.59b1(07-Dec-2017)
Added SAF support for text files: write,read,delete, app.CheckPermission, app.GetPermission.
Regards, ah

Matteo De vita

unread,
Sep 12, 2022, 2:05:32 AM9/12/22
to DroidScript
good morning 
Thanks for the info.
can you please tell me where to download the stable versions of DS that you indicate? from the play store, or from other sites? 
Play store does not offer me the update function. do i have to uninstall DS from the phone and reinstall it? obviously saving the projects first.
thank you
Matteo

Alan Hendry

unread,
Sep 12, 2022, 7:04:16 AM9/12/22
to DroidScript
Hi,
Android 10+ has scoped storage which deletes all files belonging ti an app if the app is uninstalled.
So to keep your DS projects/apps always install new versions on top of existing versions (or old versions).
(It's a good idea to back up your projects/apps on a regular basis anyway).
The current release is 2.50 (see http://androidscript.org/apk/) which supercedes/replaces 2.10b1.
Beta releases (2.51+) are still being tested (may not be stable) http://androidscript.org/beta/ 
which includes access to the beta forum. 
Reply all
Reply to author
Forward
0 new messages