Skip to content Skip to sidebar Skip to footer

Share Files Between Two Apps Using Internal Storage

I have two app which use the same package of images. The size of images is 50 Mb. I would like to use these images in both apps but download it only in the internal storage of one

Solution 1:

If you own both applications, the simplest (and secure) solution is probably to declare a sharedUserId :

If this attribute is set to the same value for two or more applications, they will all share the same ID — provided that they are also signed by the same certificate. Application with the same user ID can access each other's data and, if desired, run in the same process.

Solution 2:

internal storage has/had the possibility to set a flag for world readable/writeable, but it is deprecated since api level 17.

another solution is to use content providers which contains your data you want to share. via a content resolver you are able to access these data.

Post a Comment for "Share Files Between Two Apps Using Internal Storage"