ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.5k stars 2.21k forks source link

Switch AnkiDroid publishing from APK-first to AAB-first #9259

Open mikehardy opened 3 years ago

mikehardy commented 3 years ago

APK files are deprecated by Google for publishing, for good reason.

APK Cons:

APK Pros:

AAB Cons:

AAB Pros:

So our main benefits here are: key rotation on Google Play Store, elimination of architecture-specific builds, and forward-porting**

High-level context is that our publishing infrastructure uses these main components:

Action plan:

Should work?

github-actions[bot] commented 3 years ago

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

mikehardy commented 3 years ago

Yep - this is still important especially while I still remember how to set up AAB from the last app I just built 😅

github-actions[bot] commented 2 years ago

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

mikehardy commented 2 years ago

Going to pin it

mikehardy commented 2 years ago

10027 made me realize that if we allow users to switch locale, but ABB means that Google only ships optimized APKs including the device locale and the default locale resources, then users will not be able to access their preferred locale string translations if the preferred locale is different than the device locale.

It looks like this requirement (decouple locale resource installation from device locale) has been added to the core play library APIs so could be handled without too much trouble for ABB / play store builds: https://android-developers.googleblog.com/2019/03/the-latest-android-app-bundle-updates.html

mrudultora commented 1 year ago

@mikehardy We can disable the generation of APKs from AAB file, based on device locale (particularly region specific languages). This would be the most easiest way to overcome the issue that you mentioned in the previous comment.

AAB Cons: you have to generate an APK for other markets anyway (Amazon AppStore, Huawei AppGallery)

According to me, AAB pros outcast cons.

To solve the device locale issue:

bundle {
    language {
        // To support all the languages in app bundle
        enableSplit false
    }
}

Also, if we want to split the AAB completely, we can use core play library APIs, as suggested by Mike. At runtime, if the user changes the language from settings, that particular locale-resources can be downloaded.

mikehardy commented 1 year ago

To be clear, AAB is the future, I just want to make sure we don't have regressions. One of the issues with the play core libraries is that they are non-free, so they would not be valid in an F-Droid context for instance. There is no avoiding the continuation of APK generation (with or without splits / locale selection) unfortunately, which is why it is just an issue to switch to AAB-first, not "switch to ABB completely"

BrayanDSO commented 1 year ago

If I understood the local e packaging right and only the device languages are downloaded, this means that we can't have extinct language like Gothic anymore because no devices will have them.

If extinct languages are removed, probably we will be able to add the new Android 13 app language picker as well