Android Question Unable to access the location returned by GetSafeDirDefaultExternal from my PC

beelze69

Active Member
Licensed User
Longtime User
Hi,

I am unable to view the folder returned
via GetSafeDirDefaultExternal on my mobile.

I ran Erel's following code:

<CODE>
Sub Activity_Create(FirstTime As Boolean)
Dim rp As RuntimePermissions
If rp.GetSafeDirDefaultExternal("") <> File.DirDefaultExternal Then
Log("Please post: " & rp.GetSafeDirDefaultExternal(""))
Log(File.DirDefaultExternal)
Else
Log("Nothing interesting")
End If
End Sub

<CODE>

GetSafeDirDefaultExternal returns /data/data/b4a.example/files.
and DirDefaultExternal returns /mnt/sdcard/Android/data/b4a.example/files

However, I am unable to find the above folder when I connect my mobile to my PC.

I have read elsewhere in the forum that it is possible to view the folder returned by GetSafeDirDefaultExternal from the PC when you connect the mobile device to the PC.

My intention:

To physically copy a file from my PC to the folder on my mobile device(i.e. to the folder returned by GetSafeDirDefaultExternal) and then write code using Firebase storage to 'upload' that file to my Public Folder accessible via the FIREBASE console.

Ps. help.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Please use [code]code here...[/code] tags when posting code.

It depends on the phone itself and how it manages the secondary storage.
A safer solution which you can use is to add FTP server to your app as done in B4A-Bridge and then you will be able to access the folder you want from Windows file explorer.

https://www.b4x.com/android/forum/threads/74320/#content
 
Upvote 0
Top