Android Question 2024 way to share files between apps (shared folder)

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi everyone,
Disclaimer: The app I’m developing will not be published on the Play Store.

I’ve a WatchDog app (WD) that launches the Main app (M) with which the users actually interacts.

The goal is to be able to update M.
The idea is to download the new apk file in a folder through M itself, and then WD should throw the intent to install an apk by using the one just downloaded by M (so the folder must be accessible by both).

But I saw that is not so easy anymore… is there any way? If not, what is the right way to do something like that nowadays?

thanks in advance
 

JohnC

Expert
Licensed User
Longtime User
If the app will not be in the playstore, then you don't need to set the TargetSDK to something recent that will cause all the restriction headaches you are seeing in other threads. You should be able to set it to like 27, which will allow your app to do a lot of things with few restrictions, including being able to access the root directory.

Depending on exactly how you will do things, you may need to use the FileProvider class to share a directory:

Here is the thread that shows the different restrictions for each targetSDK level:
 
Last edited:
Upvote 0

JohnC

Expert
Licensed User
Longtime User
The only restriction that I know of that depends on the version of android running on the device is that if your device is running android 14+, you will not be able to install apps with a target SDK of 22 or lower (android 6) without doing some ADB commands:

https://droidwin.com/how-to-install-android-6-or-older-apks-on-android-14/

I don't know all the functions your app will use, so I don't know exactly what else will be effected.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…