REGARDING SAVING DATA

56 views
Skip to first unread message

Soni Kumari

unread,
Aug 10, 2026, 10:29:03 AM (9 days ago) Aug 10
to DroidScript
I build an app that that save images in /sdcard/Myfolder which is not accessible by file manager
Is there any way to save directly in "Pictures"  folder for image
And "Documents" folder for other files like pdf save.
Without using other methods like asking permission to save it

And aslo i search about it /sdcard/ to save files
Saving files in /sdcard/ path will reject my app on playstore?
Please provide correct way and for saving data 
I'm very new to upload it on PS and my app made with html 

Alan Hendry

unread,
Aug 10, 2026, 11:52:28 AM (9 days ago) Aug 10
to DroidScript
HI,
Since Android 11 Scoped Storage means that
you have a specific folder to store your files
(app.GetPrivateFolder) which other apps can't access
(not even the Files app).
To use Documents/Download/etc folders
you MUST get the users permission
See app.GetPermission("extsdcard") and examples for SAF.
The paths can be obtained by app.GetSpecialFolder.
Regards, ah

Soni Kumari

unread,
Aug 10, 2026, 4:04:34 PM (9 days ago) Aug 10
to DroidScript
I found an app from playstore, i have noticed that app saved file in documents whithout any single permissions
Or something to allow.
Why? 

Alan Hendry

unread,
Aug 10, 2026, 4:59:03 PM (9 days ago) Aug 10
to DroidScript
HI,
Some apps like X-plore File Manager,
try to give access to all folders, 
but in my experience they fail at some version if Androud.
(MANAGE_EXTERNAL_STORAGE) allows apps to read and write to all files on a device's shared storage, but it is heavily restricted and typically granted only to specific types of apps like file managers and backup tools. To use this permission, developers must declare it in their app's manifest and request user approval.
(I believe you'd need to build then edit the manifest.)
Regards, ah

Soni Kumari

unread,
Aug 11, 2026, 12:57:11 AM (8 days ago) Aug 11
to DroidScript

So to save data, what should i use to save files?
app.GetInternalFolder() or GetPrivateFolder()?
Which is good approach without any issue on Playstore?

Alan Hendry

unread,
Aug 11, 2026, 4:24:54 AM (8 days ago) Aug 11
to DroidScript
HI,
If you want the user to see the files (Files/Photos/etc apps)
then use SpecialFolder or InternalFolder (or External).
If not then Private.
For SAF you can savetext the uri when you get permission,
then subsequently when the user invokes the app then loadtexr.
It may be worth looking at putting these at the start
_AddPermissions("extsdcard");
_AddPermissions("Storage")
Regards, ah

Cemal

unread,
Aug 11, 2026, 6:43:10 AM (8 days ago) Aug 11
to DroidScript
Hi,

Both methods work without issues.

app.GetInternalFolder: Uses a location accessible to users — /sdcard/android/com.your.app/files
app.GetPrivateFolder: Uses a location that users cannot access — /data/data/...

Soni Kumari

unread,
Aug 12, 2026, 5:12:42 AM (7 days ago) Aug 12
to DroidScript
Thankyou! It works but file not accessible 
Also i try demo code for storage access but not working that demo
Android 16 iQOO mobile

Reply all
Reply to author
Forward
0 new messages