Search articles

Search for articles

Sorry, but we couldn't find any matches...

But perhaps we can interest you in one of our more popular articles?

Distributing Native Android app with Flutter Module using Codemagic

Dec 3, 2019

Written by Souvik Biswas

In this article, I will be showing how to distribute Native Android project containing Flutter modules using Codemagic CI/CD.

There are two main steps for distribution:

  1. Code signing
  2. Publishing to Google Play store

This article is follow-up to how to add FLutter modules to native Android project and test it on Codemagic

Code signing

You have to complete the code signing in order to distribute to your Android app to Google Play store. It helps to identify who is the developer of the app, so that when you push your future updates to the app it can ensure that they are coming from you only.

First of all, for code signing you will need a keystore.

A keystore can hold multiple keys, where each key is identified with its alias. Both the keystore and the alias are protected by passwords.

  • Every app must be signed using the same key throughout its lifespan.
  • If you're using Android app bundles, then you will also need to enroll your app into app signing by Google Play.

Generating a keystore

You can create a keystore for signing your release builds with the Java Keytool utility by running the following command:

keytool -genkey -v -keystore keystore_name.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Please run this command in the directory where you want to store this keystore file. This is a very important file for an app, as you will need this file in order to publish your future app updates to Google Play store.

The above command will generate a keystore file with the name keystore_name and with an alias name of alias_name. This key will be valid for 10,000 days.

Replace the keystore_name with the name that you want to give to the keystore file. Also replace the alias_name with a name that you want to give to this alias and please remember this alias name as you will be needing this for further configurations.

You can follow this video in order to generate the keystore file: