Android Question Accessing files of another apk

HARRY

Active Member
Licensed User
Longtime User
Hi,

I have two apk's, which are related to each other. One creates a file to be used by the second one. Does any possibility exist with Android 4.4.2 to realize that the second apk deletes and creates a file in the Files folder of the first apk? May be by special permissions?

Harry
 

bgsoft

Well-Known Member
Licensed User
Longtime User
You can copy the file from the folder DirAssets, to the root (or anywhere) and so you can access from the two applications.

Also if you know the destination folder, you can copy it from the folder DirAssets.

B4X:
File.copy(File.DirAssets,"FileName",File.DirRootExternal, "/Filename")
File.copy(File.DirAssets,"FileName",File.DirRootExternal, "/Android/data/packageName/files/FileName")


regards
 
Upvote 0

HARRY

Active Member
Licensed User
Longtime User
No result. I tried with File.DirRootExternal , but it refers to the Phone storage itself, not to the SDcard. Then I tried to refer to the SDCard, as named on my mobile: "/storage/extSdCard", but then I get access denied. More suggestions?
By the way, I use Android 4.42.
Harry
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

bgsoft

Well-Known Member
Licensed User
Longtime User
No result. I tried with File.DirRootExternal , but it refers to the Phone storage itself, not to the SDcard. Then I tried to refer to the SDCard, as named on my mobile: "/storage/extSdCard", but then I get access denied. More suggestions?
By the way, I use Android 4.42.
Harry

For a long time, and "security policy" on Google :D, you can not write to the external SD program, unless you're root.

Look at this:
https://code.google.com/p/android/i...rd&colspec=ID Type Status Owner Summary Stars

On Android 4.4+ you can find the path to the sd card with the code posted here: https://www.b4x.com/android/forum/threads/how-to-ext-sd-card-write-on-android-4-4.42177/#post-255351
 
Last edited:
Upvote 0
Top