How to Create and Publish Your First Flutter App on Google Play Store?

by Developers for Hire
publish flutter app
0 0
Read Time:7 Minute, 32 Second

In this era of mobile-first generation, having a mobile app for your business can add to its success. However, before you get started, you may have to go through a bunch of questions and the most prominent among them is choosing between the platform and development framework. For businesses opting for cross-platform app development, we don’t think there is a better development framework than Flutter. It allows to build stunning and high-performing apps that run on multiple operating systems.

That’s not all! With Flutter, developers can create visually appealing user interfaces, deliver native-like performance, and streamline the development process. So, if you’re planning to create your first Flutter app, this tutorial is meant for you only.

In this complete tutorial, we will learn the process of building and publishing a Flutter app on the Google Play Store. So, let’s get started!

Prerequisites

  • Ensure your system has Flutter and Dart installed. You can visit their official sites to download them and even follow the installation guide.
  • Download and install the Android Studio for Android app development.
  • You need to have a Google Play Developer account, if you don’t have you can create one.

How to Build a Flutter App for Android?

In this guide, we will be building a simple To-do app. You can follow the steps below to create your first app based on what we build. As a learner, you will experience the entire process and coding to have good practice.

Step 1: Open the repo in VS Code

  • Run the syntax:

git clone https://github.com/5minslearn/Flutter-Todo-App

  • Before we move forward with the app development process, it is crucial that your app runs seamlessly on a physical device or simulator, without any errors.
  • Launch VS Code and open the repo. To run the app on your device or emulator, press F5.

Step 2: Customize Default Launcher Icon

A new Flutter app comes with a default launcher icon.

To customize this icon we need to do the following:

You can design your own icon by following this guideline.

  • In the [project]/android/app/src/main/res/ directory, put your icon files in folders. The default mipmap- folders show the right naming convention.
  • In AndroidManifest.xml, change the application tags android:icon attribute to refer to icons from the previous step (for instance, <application android:icon=“@mipmap/custom_icon” …).
  • Here, we have made an icon named custom_icon.xml with different resolutions (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi):
48 × 48 (mdpi)

72 × 72 (hdpi)

96 × 96 (xhdpi)

144 × 144 (xxhdpi)

192 × 192 (xxxhdpi)

We have also put each icon in the mipmap folder and mentioned them in the AndroidManifest.xml.

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.todo" >

    <application

        android:label="todo"

        android:name="${applicationName}"

        android:icon="@mipmap/custom_icon">

        .....

        .....

    </application>

</manifest>

We are using ColorControlNormal in our custom icon file (custom_icon.xml):

<vector xmlns:android="http://schemas.android.com/apk/res/android"

    android:width="48dp"

    android:height="48dp"

    android:viewportWidth="960"

    android:viewportHeight="960"

    android:tint="?attr/colorControlNormal">

  <path

      android:fillColor="@android:color/white"

      android:pathData="M380,....,453.5Q592,463 613,483Z"/>

</vector>

ColorControlNormal is a value that represents a color attribute that is determined at runtime, enabling the drawable to adapt to the color theme of the app.

Since we are using an older API version, this feature is not available within the older API.

To fix this, we have added the appcompat library in our app/build.gradle file:

...

dependencies {

    ....

    implementation 'androidx.appcompat:appcompat:1.3.1'

    ....

}

....

We are done with our configuration. Let’s run the app and see the icon on the device.

Step 3: Setting up the Keystore

A keystore in Flutter, for Android specifically, is a safe container that holds cryptographic keys and certificates. It’s essential to keep your app secure, especially when handling confidential information such as API keys, authentication tokens, and encryption keys.

The keystore makes sure that these sensitive assets are held in a manner that makes them hard to retrieve from the device.

To make a Keystore, you usually use the keytool utility that is part of the Java Development Kit (JDK):

keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-key

Step 4: Test the App Bundle

You can test the app bundle in multiple ways. The two of the most popular ones include: Offline using the bundle tool and online using Google Play.

Offline using the bundle tool

  • The first step is to download the bundle tool from the Github repository.
  • Now, generate an APK from your Android app bundle.
  • Deploy the APK files to all connected devices.

Online using Google Play

You can upload your app bundle on Google Play to test it online. You can choose between alpha, beta, or internal test track to test the app bundle prior to its release in production.

Step 5: Generating APK or AAB in Flutter

APK (Android Package) and AAB (Android App Bundle) are formats that are used to bundle and distribute Android applications. It is better to build an app as AAB instead of APK because of the following advantages:

  • Optimized APKs lead to smaller downloads and quicker installations
  • Better efficiency in using resources and lower storage usage
  • Dynamic feature delivery support for providing features when needed
  • Improved optimization for different device configurations
flutter build appbundle

or

flutter build apk

An Android App Bundle (AAB) file is not a standalone package that can be installed on a mobile device like an APK (Android Package) file.

Rather, the AAB is a publishing format that enables efficient delivery on the Google Play Store. The Play Store uses the AAB to create APKs that are customized for each user’s device settings.

This way, the Play Store only downloads the required code and resources for a particular device, making the app smaller and faster to install.

How to Publish a Flutter App on the Google Play Store?

To publish your Android app on the Google Play Store, you will need a developer account. However, you can sign up using your existing Google account or create a new one. Please note that there is a one-time payment of $25 or more required for the registration.

Here’s a step-by-step process for publishing an Android app on the Play Store:

  • To create an app, go to the ‘All Apps’ section and click on the Create app button.
  • Fill in the app details in the “Create app” form.
  • After that, we need to complete several steps to launch the application. These tasks are easy to follow and will guide us through the process.
  • Give information about your app, such as ads, privacy policy, and more. You have to finish these steps before we can publish our app.
  • You have to be very clear and honest about everything. Especially the questions about data collection. Because, if Google finds out that your information is incorrect, your app will be either rejected or removed, if it’s already published.
  • Once you finish these steps, you will have to submit the app for review. Your app will be published after the Google Play team approves it.

Remember that your app might get denied if it has issues with security or advertising. So, you need to carefully check your app to make sure that it doesn’t have any problems with data collection. This will help us have a better and smoother app release experience.

How to Ensure Your App Features on the Google Play Store?

The ultimate goal of a developer is to create an app that garners quick adoptions and thousands of downloads. However, it is not something that you get right after publishing your app on the Play Store.

There are certain practices and strategies you should follow. These include working on the latest technologies, user feedback, user interaction, visual design, localization, etc. But once you properly follow these practices, it will benefit your app and increase its reach to a wider audience.

What to do After You Publish Your App on the Play Store?

That’s a tricky but crucial question. Your app is developed for your audience and it should reach them with ease. But how will you ensure that? Well! There are some tips and tricks that help in extending your app’s reach. Here are some:

  • Promote App On Social Media
  • Initiate Press-Release
  • Focus On App Maintenance And Update
  • Practice App Store Optimization (ASO) Strategies

Conclusion

We have tried to cover the process of Flutter app development and publication to the Google Play Store. With examples and code samples provided, you can easily practice creating your first Android app.

However, real-world complexities may require you to make additional configurations in your app development. So, it is important to keep up with the latest developments in the mobile app development industry.

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

You may also like

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *