Gio
Gio

Reputation: 3340

How to ensure a file is preserved, after android app update

I have a xml file which contains editable patterns (these patterns represent audio rhythms). When the application is first installed, it comes with a default xml file, the user can edit the patterns in this file through the android application. If an user updates his android application, is there a way to ensure that the edited xml file is preserved?

Upvotes: 0

Views: 48

Answers (1)

Raghav Sood
Raghav Sood

Reputation: 82543

You can copy the editable file to your application's internal storage (or download it there directly) the first time your app runs.

Post that, as long as the user does not clear data or uninstall and reinstall your app, this copy of your file will persist across updates.

Upvotes: 3

Related Questions