Links

Google Play Store Deployment with Codemagic

FlutterFlow integrates with Codemagic, allowing you to deploy apps directly to Google Play Store.
Before deploying your app, we recommend testing your application on a real device. Here are instructions on how to do this.

Prerequisites

  • Set an App Launcher Icon for your app (under Settings & Integrations --> General). The App Launcher icon can't be transparent or contain an alpha channel.

Deployment Process

Deploying apps to Google Play Store comprises of following steps:

1. Creating App on Google Play Store

To create an app on Google Play Store:
  • Click on the Create App button at the top right side of your screen.
  • Enter the App Name, Select the App and choose whether the app is Free or Paid.
  • Accept the Declarations.
  • Click Create App at the bottom.

2. Set Up Your App

In order to successfully deploy the app, you must fill all the app details required by the Google Play Store.
To fill in the app details:
  • Select your newly created app from the list below.
  • In Dashboard, scroll down to the Set up your app section, click on the view tasks.
  • Click on each task and provide the app information.

3. Adding Service Account Credentials

Adding Service Account Credentials to FlutterFlow allows Codemagic to publish applications to Google Play.

3.1 Creating Service Account

To create the Service Account, please follow the instruction here.

3.2 Uploading Service Account Credentials to FlutterFlow

To upload the Service Account Credentials (downloaded in the previous step) on FlutterFlow:
  • Open your FlutterFlow project.
  • Navigate to Settings & Integrations --> Deployment and scroll down to the Google Play Store section.
  • Under the Service Account Credentials, Click on Upload Credentials and select the downloaded credential i.e .json file.

4. Deploy to Google Play Store

To enable FlutterFlow to deploy your app to Google Play Store on your behalf, you have to first get the .AAB file and upload it to the Internal Testing Track on Google Play Store.
Once the Internal Testing track is ready (with .AAB file), FlutterFlow can handle the subsequent releases.
Although you can release your app directly to Production Track, it is advisable to first release it within your team using the Internal Testing Track.

4.1 Getting the AAB (App Bundle) File

To get the AAB file:
  • Open your FlutterFlow project.
  • Navigate to Settings & Integrations --> Deployment and scroll down to the Google Play Store section.
  • Set the Google Play Track to Internal.
  • Click on Deloy to Play Store.
  • Click on Deploy again.
  • Click on the Check Build Status. If you don't see the AAB APK options yet, wait for some time.
  • Click on the AAB to download the .aab file.
You need to get the AAB file only for the first time.

4.2 Creating Testing Track

To create the testing track:
  • Select your app from the list below.
  • From the left side menu, select the Testing and then select the Internal testing.
  • Click on the Create new release at the top right side of your screen.
  • Upload the App Bundle i.e .AAB file.
  • Enter the Release Details.
  • Click Save and the Review Release.
  • Click Start rollout to Internal testing and then Rollout.
  • Move to the Testers tab and add some users to test your app.
  • Click Save changes.

4.3 Deploying To Google Play Store

You can deploy directly from FlutterFlow or from your GitHub repository.
Deploy From FlutterFlow
Deploy From Github
  • Open your FlutterFlow project.
  • Navigate to Settings & Integrations --> Deployment and scroll down to the Google Play Store section.
  • Set the Google Play Track to Internal.
  • Click on Deloy to Play Store.
  • Click on Deploy again.
Associating the Github repo allows you to introduce the custom code into your FlutterFlow project. You may want to deploy the modified code directly from your Github repo to App Store.
To deploy from Github repo:
  • If you haven't added the Github repo yet, you can do so using the instructions here.
  • From FlutterFlow, navigate to Settings & Integrations --> Deployment.
  • Find the Deployment Settings section and click on the arrow icon on the right to open it.
  • Under the Deployment Source, checkmark the Use Github repo: 'your repo URL'.
  • Enter the Branch Name of your repo, from which you want to deploy the code. Make sure to enter the correct branch name.

4.4 Verify Deployment

To verify the deployment:
  • Select your app from the list below.
  • Select the Testing and then select the Internal testing.
  • Under the Releases section, find your release and click on the Show Summary button.
  • See the Version Codes number is increased.

4.5 Deploy to Production

To deploy your app to production:
  • Select your app from the list below.
  • From the left side menu, select the Testing and then select the Internal testing.
  • Under the Releases section, find and click on the Promote Release dropdown.
  • Select the Production. This will create the Production track and you can continue to release your app from there onwards.

4.6 Deploying from a Github Branch

If you are experiencing problems deploying or uploading to the Google Play Store and are deploying from a Github branch, check to make sure your build.gradle file is correct.
  • Open your android/app/build.gradle file.
  • Ensure your file has these lines of code:
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
  • Newer Flutterflow code will automatically have these lines added. If yours doesn't, you can push to your flutterflow branch on Github and merge in the changes, or add them like so:
  • Lastly, change debug (shown in the red box above) to release before deploying.