-
Notifications
You must be signed in to change notification settings - Fork 19
Custom format changes in version 1.3
You're probably here because you've just been prompted to copy your custom formats to a new location!
If you had custom formats for Debatekeeper prior to version 1.3 (yet to be released), here's what you need to know about how they're changing.
The main change is that custom formats are no longer stored in the debatekeeper
directory. Instead, they're now stored on a scoped "app-specific" directory on your phone. This directory is managed by Android, and will be deleted if you uninstall Debatekeeper.
This has a few consequences:
-
You should keep a copy of all your custom formats somewhere else.
You probably already do this. If you wrote the file yourself, you probably wrote it on a computer. If someone sent the file to you (by e.g. email or WhatsApp), then it's probably in that email or message. Keep that file around, even after you import it into Debatekeeper!
-
You can delete the (legacy)
debatekeeper
directory from your phone.After Debatekeeper copies your files from the legacy location to the new location, it will never need to look in the legacy location. First, make sure that all your custom formats work in Debatekeeper. If they do, then you can (and should) delete the legacy
debatekeeper
directory, after making sure you have a copy of those files somewhere else (as discussed above).
Thirdly, this change allowed me to simplify how formats are managed a little:
-
There is now no distinction between custom and built-in formats.
Debatekeeper no longer has "built-in" formats.† Instead, it downloads formats from an online repository. The custom and built-in formats are stored in the same directory. If there is a file name conflict, the new file will overwrite the existing one, regardless of whether it's imported from a file or downloaded via the app.
File names are still the unique identifiers, so if you have your own format file, you should name it something that doesn't conflict with any files in the online repository. (Better still, submit it for inclusion in the online repository!) If, in the future, a file is added to the online repository that has the same name as your file, Debatekeeper will show that you've already downloaded the file.
† Debatekeeper still ships with four formats (Asians, Australs, BP and WSDC), but only so it can fill the formats directory the first time the app is opened.
Yes, you can! The new "external scoped storage" system provides an app-specific directory that isn't hidden from other apps. This means you can find the directory using, e.g., the Files Manager app on your phone.
I can't tell you where it is, though, because it varies by device. Try looking for a directory called Android
somewhere, then it's probably something like /.../Android/data/net.czlee.debatekeeper/files/formats/
.
If you delete all formats from Debatekeeper, and then close and reopen the app, Debatekeeper will think you're starting anew. So it'll copy Asians, Australs, BP and WSDC over, and, if it has external storage permissions from before version 1.3, it'll check the legacy directory again to see if it finds any custom formats.
If you have a lot of formats, a quick way to delete them all might be to find the new formats location (not the legacy
debatekeeper
directory!) in Files Manager and perform the select-all deletion there.
However, if you've uninstalled and reinstalled Debatekeeper, then the app will not prompt you to copy custom files from the legacy directory. This is because the app doesn't have permission to access external storage—and Debatekeeper no longer asks for this permission, because it no longer needs it. Similarly, avoid clearing app data via application settings. Clearing data from an app on Android also clears permissions, and—as just described—Debatekeeper no longer asks for external storage access.
Once you've uninstalled the app, cleared app data or otherwise revoked storage permissions, it's not possible to bring up the legacy formats prompt again. If you've done so and need to restore formats from your legacy location, you'll need to either import them into Debatekeeper one by one, or copy them all into the new location using Files Manager (or similar).
To be honest, the pattern that Debatekeeper used was always against recommended practice. So this change brings it in line with how Android apps are "meant" to work.
But some more recent changes to Android have both allowed and forced this change. First, Android 10 introduces "external scoped storage". This (finally) allows apps to store files in a location that is both user-accessible and app-specific.
Second, and more importantly, Android 11 enforces "scoped storage", removing the non-scoped access to the file system that Debatekeeper previously relied on. Moreover, starting in November 2021, all new app updates must target Android 11 or higher. This will break Debatekeeper's access to the now-legacy location.
The reason I broke the standard pattern in earlier versions of Debatekeeper was that I wanted to allow users to manage the files directly, if they needed to. Before Android 10, the app-specific directory was hidden from direct user access, so I used a general directory instead. Starting with Android 10, apps no longer have to choose between the two.
The changes above apply even if your phone runs an Android version earlier than 10 (e.g., Android 8 or Android 9). The new behaviour applies according to an app's "target version", not the actual version being run by the user.