Page 2 of 2

Re: Saving a files on Android

Posted: Wed Apr 10, 2019 10:50 pm
by Pierre55
Hi AirSoftSoftwair,

I have a Samsung Galaxy TAB S2 with Android 7.0

Sorry but there is a REQUESTER asking where to save but no interface like in the Amiga, Windows and Mac I suppose in wich we can browse directories to choose where we want to save the file.

Here a link so yuo can see what I have on my screen.

http://pages.infinit.net/pgx/Screenshot ... 164410.png

Thank you.

Pierre.

Re: Saving a files on Android

Posted: Thu Apr 11, 2019 8:40 pm
by airsoftsoftwair
Is this in an applet you run with Hollywood Player or is it in an APK compiled by the Hollywood APK Compiler? If it is in an APK compiled by the APK Compiler, you have to use PermissionRequest() first. Otherwise Hollywood won't be able to read from your external storage, which means that FileRequest() won't show any files and folders to browse through.

Re: Saving a files on Android

Posted: Tue Apr 16, 2019 2:24 am
by Pierre55
Hi,

PermissionRequest() seems only for saving on an external device, I don't have any external device!

I was thinking to get a requester that will give me the choice to save the file in PICTURES, AUDIO, VIDEOS, DOCUMENTS, DOWNLOAD or any other folders available in the INTERNAL STORAGE.

Thank you.

Pierre.

Re: Saving a files on Android

Posted: Tue Apr 30, 2019 8:42 pm
by airsoftsoftwair
I don't think Android provides such a capability. Or do you know any apps which provide such a file requester?

Re: Saving a files on Android

Posted: Wed May 08, 2019 2:03 pm
by Pierre55
Can you send me the script you use to test the FileRequest() on the Android ?

Thank you.

Re: Saving a files on Android

Posted: Wed May 08, 2019 10:15 pm
by airsoftsoftwair
It's just a single line:

Code: Select all

DebugPrint(FileRequest("Select file"))

Re: Saving a files on Android

Posted: Sun Jun 23, 2019 11:42 pm
by amyren
My program is made so it will use progdir for saving when I compile for Windows or Amiga.

The same program (apk) running on android does work well for saving or loading, even I did not use permissionrequest() in my code.
But I have no idea where those savefiles are located on my device.
Where will files be saved if no path is specified?
I did try to search for the files with ES-fileexplorer without luck. Are they perrhaps hidden unless the device is rooted?

Re: Saving a files on Android

Posted: Mon Jun 24, 2019 5:02 pm
by airsoftsoftwair
amyren wrote:
Sun Jun 23, 2019 11:42 pm
Where will files be saved if no path is specified?
Internal file storage.
amyren wrote:
Sun Jun 23, 2019 11:42 pm
I did try to search for the files with ES-fileexplorer without luck. Are they perrhaps hidden unless the device is rooted?
Yup. Quote:
By default, files saved to the internal storage are private to your app, and other apps cannot access them (nor can the user, unless they have root access). This makes internal storage a good place for internal app data that the user doesn't need to directly access. The system provides a private directory on the file system for each app where you can organize any files your app needs.

When the user uninstalls your app, the files saved on the internal storage are removed. Because of this behavior, you should not use internal storage to save anything the user expects to persist independently of your app. For example, if your app allows users to capture photos, the user would expect that they can access those photos even after they uninstall your app. So you should instead use the MediaStore API to save those types of files to the appropriate media collection.
(source)

If you want them to be visible to other apps, use external storage and PermissionRequest().