Android Question Copy file from another app

Status
Not open for further replies.

BugNot

Member
Hello,

How to copy a file from another application knowing that the two applications are mine?

What is the path to File.DirInternal? /data/data/com.app.xy?

How to go to the DirInternal of the other application?

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
What is the path to File.DirInternal? /data/data/com.app.xy?
yes
How to go to the DirInternal of the other application?
You can not access DirInternal of another Application.

You can request permission to File.DirRootExternal (Runtimepermissions) and save the file on a Place on the SD-Card.
Implement Runtimepermission in both apps so both can access the File in SDCard.

You can send an Intent to the other app to inform the app about the new file.
 
Upvote 0

BugNot

Member
Ouch, that doesn't suit me ...
I have to find another solution.
The user of the free version after use if he decides to buy the full version, I must be able to recover the files from the free to the full.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can save the file under RuntimePermissions.GetSafeDirDefaultExternal in the free version. No special permission needed.
Add Log(rp.GetSafeDirDefaultExternal) to see the path. It shouldn't be complicated to get the path of a different app.

In the paid version you will be able to access that folder with the READ_EXTERNAL permission.
 
Upvote 0
Status
Not open for further replies.
Top