Android Question Change storage location for apps that have already been published (targetSdkVersion 29 -> 30)

Tempomaster

Active Member
Licensed User
Longtime User
Hello,

I published my app Tempomaster on the Play Store for the first time four years ago. The app accesses a large database (300 MB) which requires access to File.DirRootExternal. From November onwards, the app will no longer be allowed to access this storage area in the event of updates. The app is currently installed on 4000 devices. What is the easiest way to change the storage location in the existing installations. Creating the new path (RuntimePermissions.GetSafeDirDefaultExternal) and moving the existing files is very time consuming. I am concerned that errors will occur that will annoy my active users. When updating, deleting the old data and requesting a new download of the database requires a very large data volume on the server side.

What better way to solve this problem?

Best regards,
Gunnar
 

drgottjr

Expert
Licensed User
Longtime User
moving a large resource will certainly take less time than downloading one. and is less error-prone
or subject to problems than downloading. you would, of course, need to check to make sure the
user has enough storage space available to hold what is essentially 2 copies (before the original is
deleted).

i've used several apps which required downloading more than 2GB of data either on installation or
subsequent updates. you run a service in the background with a notification. the user can switch away
to another app if she wants. similar scenario for a local move. you just tell the user up front what's
going to happen.

try it on yourself. you're lucky you still have time to get 'er done.
 
Last edited:
Upvote 0

FrostCodes

Active Member
Licensed User
Longtime User
Hello,

I published my app Tempomaster on the Play Store for the first time four years ago. The app accesses a large database (300 MB) which requires access to File.DirRootExternal. From November onwards, the app will no longer be allowed to access this storage area in the event of updates. The app is currently installed on 4000 devices. What is the easiest way to change the storage location in the existing installations. Creating the new path (RuntimePermissions.GetSafeDirDefaultExternal) and moving the existing files is very time consuming. I am concerned that errors will occur that will annoy my active users. When updating, deleting the old data and requesting a new download of the database requires a very large data volume on the server side.

What better way to solve this problem?

Best regards,
Gunnar
Maybe you can try moving the files slowly.. for example, if you have 300 files.. move 10 at once in the background(using a service or foreground service) and while the app is still opened you keep copying the rest till it's all done then you delete the old files... Not sure if this can work but might be worth trying.

Another way might be to tell your users you need to upgrade their app and it might take some time but it's automatic and then you use a foreground service to handle it till you are done.
 
Upvote 0
Top