App Bundles with Firebase app distribution
Asked Answered
E

5

14

so currently we are exporting APK to the play store and we are using Firebase app distribution for our testing track but now we want to start using App bundles instead of APK but the issue here that Firebase app distribution does not support App bundles, I thought of deploying an APK for the testing track and then publish an App bundle for play store release, but I think there is a risk here since the app bundle is not tested and may contain undiscoverable issue, our options are to migrate the testing track to the internal app sharing in the play console, is there a way to make Firebase app distribution support App Bundles or any other options?

Erogenous answered 7/12, 2020 at 11:28 Comment(0)
G
7

Update May 2021: This is now available with Firebase App Distribution! You have to link Firebase to your Google Play account and then distribute .aab files without problems πŸ‘

More info: https://firebase.google.com/docs/app-distribution/troubleshooting?platform=android#distribute-aabs

Gare answered 12/5, 2021 at 8:50 Comment(7)
thanks! seems like it is only doable if you already have your APK published on the play store but in my case, I have many APK flavors of the same app that are not intended to be published, like the QA flavor, so, I think is not possible to use this feature for those cases. – Enteric
@Enteric I have not tried yet but according to the docs it seems to me that your app does not have to be published to PlayStore but at least be published to internal / testing tracks. – Slit
@Slit that's a good hint, but in order to do that, I need at least create a new app on the play console and publish an internal testing right? I', telling you this because I saw these 3 comments on the firebase console when I tried to link my QA app with the play console in order to use app distribution: To link this app, make sure: 1. The connected Google Play account is the app’s Owner or Account Admin 2. Both apps share the same package name 3. Your Google Play app is published – Enteric
@Enteric I see. Yes, if you want to test your QA app with app bundle, and your QA app's package is different from the PlayStore-releasing app, then you need to create and register new app for your QA app on play console first, and publish your QA app bundle to internal testing in order to distribute your QA app bundle through FAD. – Slit
@Slit for my case I couldn't do this, since to link the app with firebase your app needs to be published. (not on internal testing) – Albuminuria
@OmarAbdan Same situation here. Unless the flavor's review and publish to Closed Beta done, Firebase Distribution will not accept the test flavor's .aab file. It's such a huge waste of time to duplicate everything to publish to Closed Beta with it going through the review process PER FLAVOR to be able to upload to Firebase Distribution for testers. – Cure
Because of all the unnecessary effort of setting up a published Play Store app for each test flavor, our team will keep using .apks for all Firebase App distributions except for the actual production flavor that needs to go to Play Store. – Cure
A
2

That's actually the only way for now. You have to upload AAB to playstore and APK to app distribution. Using app bundle will not cause any kind of testing issues or undiscoverable problems. I have worked at two mass-scale product companies, both are using the same formats and haven't faced any issue.

Amperage answered 7/12, 2020 at 11:59 Comment(2)
Unfortunately wrong. App bundles can break stuff if you are not aware of it. One real live example is a separate "change language" feature in the app. The app doesn't download any additional languages unless they are configured as additional languages in android. Therefore, manual language changes will fail or at least require modifications to the build.gradle file. Also, one should test if the app handles missing dynamic feature modules / install time modules correctly. – Aleishaalejandra
there is a different way to test dynamic modules, you have to create a combined apk for that using adb bundletool. I don't think using aab for playstore will cause any kind of issue. – Amperage
P
2

Firebase App Distribution supports Android App Bundles (AAB)

This is documented on Firebase Distribute Android apps to testers using the Firebase console, just click the AAB button.

This guide describes how to upload Android App Bundles (AABs) to App Distribution and distribute generated APKs using the Firebase console. To follow this guide, you'll need to have access to a Google Play account for which you're an Admin or Owner, and an app that's been published on the Play account.

Caution: When you register your app with Firebase, make sure to enter the same package name as the app you're distributing. The package name value is case-sensitive and cannot be changed for your app in Firebase after it's registered with your Firebase project.

PS: Just upload your App Bundle (with caveats). That's what I'm gonna do now :)

enter image description here

Public answered 17/8, 2021 at 12:34 Comment(0)
P
1

The best solution I have for now is to use Bundletool to create a universal .apk from my app bundle.

For our team, it was necessary to do this, since we had a dynamic feature module with <dist:fusing dist:include="true"/>, so ./gradlew assemble would not include this module in the build.

The command in CI looks something like this:

java -jar bundletool-all-1.0.0.jar build-apks --bundle=PATH_TO_YOUR_BUNDLE_FILE --mode=universal --output=zip.apks --ks=PATH_TO_KEYSTORE_FILE --ks-key-alias=YOUR_KEY_ALIAS --ks-pass=pass:YOUR_KEYSTORE_PASSWORD

Pence answered 21/4, 2021 at 14:12 Comment(0)
D
1

In case it helps anyone trying to add AAB support to Firebase Distribution:

I got the following error when enabling this option: App Bundle setup is incomplete. Follow the steps to set up your project for App Bundle uploads.

If you linked Firebase to Google Play, but didn't enable the AAB support option, you'll likely get a similar problem. I was able to fix this by unlinking and then linking again. This time making sure AAB support was enabled.

Devlen answered 15/6, 2023 at 16:34 Comment(1)
This fixed my problem, here is path: Project settings -> Integration -> Google Play – Nefarious

© 2022 - 2024 β€” McMap. All rights reserved.