Get the path of → ASD (app-specific dir) & → private data dir (internal storage)

Here is an extension to get the ASD (path of app-specific directory) & PrivateDir and the API level.

Updated: 7 Sept 2022 (permissions removed)
GetASD.aix (5.1 KB)

Example

Update: 6 May 2023 (added IsCompanion):
GetASD.aix

15 Likes
How to download a file to the ASD with any Android version
How can I share files in my app's private data directory?
Get acces to internal storage
Issue with Savefile in Android 10
How to rename and number photos (→ Camera.TakePicture) on all Android versions
Save a text file or an image (Canvas) in the ASD & share it on all Android versions
Save and retrieve TinyDBX to/from SdCard and CloudDB. Share TinyDBX
Can not play video from app storage
I got error 802
[F/OS] ⚠️ DaffyDialog - Additional Features For The Notifier Component!
Error 802 when recording , how do I fix?
Error in simple sound recorder app
Android 12 no list of Bluetooth devices, error 908
No Bluetooth list on Samsung A23
Where to download working Bluetooth classic extension without permission problems
App removed from playstore due to REQUEST_INSTALL_PACKAGES
What are these: TinyDB1 and GetASD1
Something is wrong UV sensor, Bluetooth ardiuno , and Mit app
Save and share csv file : How can I find it and show it in files on the phone
Bluetooth liste of devices deosn't work anymore
MQTT Certificate Works in Properties, But Not When Set in Blocks
I can't use the Sharing component to share text files because I don't know the file path
Help a newbie with sending variables from arduino
Some basics on Android storage system
Crear ruta de descarga a partir de Android 10
Taifun qr -> file not found
Cannot find CSV file on my phone
Sound playback and saving error (701 and 703)
Can mit app inventor make a new folder in storage
Androidversion prüfen
Not finding file in my phone
CoderDojo 10 years
Recorder : In After recording event cannot get the sound

Great extension.

1 Like

You can also use this for checking "is development" or "APK":

and / or get the packageName:

3 Likes

(added to FAQ)

1 Like

I used your extension and it worked great, thank you very much.

2 Likes

Version 2 (June 24, 2021):
de.bodymindpower.GetASD.aix (6.3 KB)

I added a new method / block:

for very good reason, because soon I'll be showing you a way you can store any kind of files in → internal storage (and not just text files like the File component does).

6 Likes

Thank you very much..

I installed this extension but I cant use it to show ASD, Could you please show me how I do this job?!
Thank you.

can you elaborate on this? what exactly are you trying to do?
Taifun

1 Like

9 posts were split to a new topic: Where do the apks downloaded from Google Play get stored?

Thank you so much for this extension.

I've been stuck attempting to specify the "file" in the 'Sharing block'.

I know that in previous posts it's been pointed out that using the block "when ....AfterFileSaved" doesn't provide a file path for Sharing, but does provide a path for "call ...ReadFrom" ??

For anyone who is interested, here is the solution using your extension

2 Likes

I added IsCompanion: GetASD.aix

2 Likes

Hi Anke,

thank you very much for sharing.

Unfortunately, I'm not an expert user, so I have some difficulties to understand all the applications that you extension could have.

So please, a question for you:

I'm trying to write a camera app, using the ProCam64 extension. Currently, my app can save a picture into the folder /storage/emulated/0/DCIM/MyFolder (so we are into the internal storage). But I can't read the same picture and load it as preview, maybe due to permissions (the app could read picture if it is stored into the ASD).

I read above that your getASD extension could store any kind of files in internal storage. So, could your extension help me in some way? If yes, how should I use it?

Thank you so much for your answer, kind regards.

Try to request READ_EXTERNAL_STORAGE permission (e.g. in the Screen.Initialize event).

I just tried your suggestion. Unfortunately, it didn't work.

Because I have also the Camera permission to request, I tried to write a "do" cycle, but by requesting the first permission in the Screen.Initialize event, and the other ones in the Screen.PermissionGranted event.

If Camera permission is requested in the Screen.Initialize, the app request also the second permission (READ_EXTERNAL_STORAGE), and it freezes when I allow it.

If READ_EXTERNAL_STORAGE is requested in the Screen.Initialize, the app starts but without asking for any permission. It seems like if READ_EXTERNAL_STORAGE is not allowed and so the Start.PermissionGranted event is not called. Obviously the issue of load the picture is not solved.

However, maybe I will open a new topic, I think we are off topic here, isn't so?

Thank you for answering me.

Post the aia (or a small test aia). It shouldn't be a big deal to solve this problem...

FolderCamera (1).aia (36.7 KB)

My device is a Xiaomi Redmi Note 8 Pro, with Android 11.

Try this:

Many thanks for you effort Anke. But also this one is not working.

The first time I open the app, it asks for Camera permission. The second time, for the storage permission. Then, when I take a picture, it doesn't save it.

FolderCameraAnke.aia (41.4 KB)

Always show your blocks as well.

Remove the space after "FOTO- ": :face_with_monocle:

... and always debug your blocks. Then you would most likely have noticed this error yourself.