Deploying Ionic Application to Play Store — Android
Tags: ionicframework, androidappdevelopment, deployment, playstore
Published: 2022-08-22 09:34:29

---
title: Deploying Ionic Application to Play Store — Android
published: true
date: 2022-07-09 06:02:28 UTC
tags: ionicframework,androidappdevelopment,deployment,playstore
canonical_url: https://enappd.com/blog/ionic-app-release-on-playstore-android/198/
---

### Deploying Ionic Application to Play Store -Android

![](https://cdn-images-1.medium.com/max/1024/1*1ErF8mN55qHPtnY6P_BfMQ.png)

Most of the developers make the application but lag when they have asked to deploy them on the Play Store (Android). So in this tutorial, we will go through complete procedures Like “How to create a signed bundle for android app and deploy the app to Play Store”.

It will be a “ **_roller coaster ride_** ” 😎, as we will be going through Android studio to the Android developer console. A lot of setup work is needed to deploy the Ionic Application.

![](https://cdn-images-1.medium.com/max/500/1*hRjp8e2tgqbyxWlUvZ_pnA.gif)


There is some Prerequisite you need to have before continuing further.

1. You need an [**_Android Developer Account_**](https://play.google.com/console)
2. [**_Android Studio_**](https://developer.android.com/studio) should be installed on your machine.
3. You should have an Ionic Application to deploy - [Most Important 😂]

Now we will start with setting up the Android app to be production-ready.

### Making Android App Production Ready 📲

I am assuming you have an Ionic Capacitor/Cordova application and it is ready to be deployed. And if you are new to the Ionic framework you can know more about that on [Enappd Blogs](https://enappd.com/blog/). Before moving on to Android Studio to create a Bundle file, there are some best practices that should be followed to create a production-ready code.

1. Delete all the unused files like unused assets/code, it helps to minimize the size of the **www** folder that will be later used in creating an APK or Bundle file.
2. Run npm run lint to remove all the lint errors in the code, it maintains the code up to a standard.

Now we will move to the android studio, where we will create the Signed Bundle file. Earlier [**_Google Play console_**](https://play.google.com/console/) accepts the APK format but now it started accepting the Bundle file.

### **What is APK and Bundle File?**

APK stands for **Android Package Kit** and it is the type of format file used by Android Devices to install the apps into it. Android Package contains different elements that are needed to install the app on the device like app metadata. APK format is a variant of JAR (Java variant).

Android App Bundle is a file (with the .aab file extension) that you upload to Google Play. App bundles are signed binaries that organize your app’s code and resources into modules. If you want to read more about this go [here](https://developer.android.com/guide/app-bundle/app-bundle-format#:~:text=An%20Android%20App%20Bundle%20is,as%20illustrated%20in%20figure%201.).

![](https://cdn-images-1.medium.com/max/1024/1*IvmOkJgwIJdXuG6yxAh6cA.png)

#### Checking Android API level (Minimum Req)

> Before creating the Bundle file, keep in mind your android app should be on Android API level 30 as accepted by Google Play Console (at the time of release of Blog)

To check what level your android app is — you can go to **platforms/android/project.properties** and check the **target** variable. Below is the attached screenshot, of how to check the target.

![](https://cdn-images-1.medium.com/max/1024/1*5DfWnYxf4f2Uo84SKEyItg.png)

If your Ionic android application is on a lower API level (<30) then to update it — add the below code to the **config.xml** file

```
<preference name="android-targetSdkVersion" value="30" />
```

The above code will help ionic-cli to know, which version of Android API needs to be added (in this case 30). If you want to change the Android level just change the value field in the above code. Now we can remove the android platform and reinstall it using the below commands.

```
$ ionic cordova platform rm android
$ ionic cordova platform add android
```

Once the Android platform is added again, you can check the _project.properties_ target variable. Now we are ready to create a signed bundle using Android Studio.

### Creating Signed Bundle File using Android Studio

Open Android Studio by locating your Android folder (_platforms/android_) and go to the **Build** menu and select **Generate Signed Bundle / APK**.

![](https://cdn-images-1.medium.com/max/862/1*rwsXOJvgMmLG7YulpFZHDw.png)

After selecting generate signed Bundle/APK, select **Android App Bundle** and click next (you can read the advantages/benefits of the Bundle file over APK)

![](https://cdn-images-1.medium.com/max/1024/1*u_TSnzVu3oMivAmm4FxOIA.png)

From here, we have to follow the steps carefully, we have to create a **Keystore** file using which we will sign the Bundle file. Before creating a Keystore file, we will dive into “what is a Keystore file”.

![](https://cdn-images-1.medium.com/max/1024/1*HTJA-G8_ozhfxLGjM1ei6g.png)

### What is a Keystore File? 🔑

The Keystore file contains the pair of the public and private keys that can be used in signing the file (any file can be signed using **Keystore** , not only APK). Here, **signing the file** means claiming the ownership of the file. If I sign an APK/Bundle file with a **Keystore** then it shows I have both private and public keys and I am the owner of that signed File.4

> Note :- Keep in mind, the generate keystore file should be **protected** as if we want to update the application in future then the Bundle file should be signed with same Keystore.

The Keystore file contains the **Keystore file password** and a **key with password and validity.** Some other basic information is also needed while creating the file like name, org, and country code.

Fill in all the required information for the Keystore file and click on “OK”. Now it returns to the previous dialog with filled-in details.

![](https://cdn-images-1.medium.com/max/1024/1*FqyMUEKMwR2NAtImuNOhNA.png)

We have created and selected the **Keystore** file that would be used to sign the Bundle File. Now we just have to click on “Next” to sign it with that Keystore. Once you click on “Next”, it will ask, In which environment do you want to sign the Bundle File. Select “release” and click on Finish.

Now, you will see a popup in the bottom right section of Android Studio, where it will ask you to locate the Signed Bundle file. (you can can click on locate or goto (platforms/android/app/release/app-release.aab).

> Note :- If you didn’t get any response after clicking finish (at last step). Then you must have wrong password or have other problem. To resolve this, try to create a signed APK (rather than creating a bundle file) using Keystore. It will show you the possible error.

Now we are ready with our **app-release.aab** file and we just have configured a few things in [Google Play console](https://play.google.com/console) and uploaded the **app-release.aab** file.

### Configuring Google Play Console

First of all, we have to create an app in our Playstore console, this app is complete details of our app — along with Bundle. This app will be published in Google Play Store. To create the app click on the “Create app” option in the dashboard.

![](https://cdn-images-1.medium.com/max/1024/1*MW4UgT1WkC69m4pkQNLulg.png)

After clicking on creating an app, it will ask for several app-level details like App name, Default language, app or game, free or paid, and will require some declarations at last (get check the boxes ✅). After filling in all the details click on Create app.

Now app is created, the first thing you have to do is to **create a release.** Select Release Overview on the side menu and select create a release and you will see the below screen.

![](https://cdn-images-1.medium.com/max/1024/1*znyoXdRz7gfnkbdFWdJvyg.png)

There is an option for App Bundle, click on the upload button and select the generated **app-release.aab** file. Google Play Console will verify the bundle file, if it has some errors it will show there itself.

> Possible Errors :- If you have uploaded a Bundle with wrong Keystore, you will get error of wrong SHA signing OR you will get the error for wrong Android API level (below API level 30).

After successful upload, it will show the uploaded Bundle file as below screenshot :-

![](https://cdn-images-1.medium.com/max/1024/1*DzbWDx4qjPJa9EPKvjZ8Tg.png)

After setting up the release, you have to click on **Review Release.** If there are some errors in creating a release it will show up (you will get an option to fix those error). While fixing those errors you will be taken to the Dashboard to update the Store details like App screenshots, Details, and other stuff.

![](https://cdn-images-1.medium.com/max/1024/1*oSvL-AhAH2OdSzBHrCTGtA.jpeg)

Dashboard contains various setting up info, like Target Audience, app access and more. You can also create an internal testing team and release an app for only a limited group of people. Some of the Information is mandatory — without entering it, you will not be able to release the application.

Select Dashboard, Goto “Set up your App” and click on “Set up your Listing”. This is the most important part to set up, this info will be seen by users on the Play store.

![](https://cdn-images-1.medium.com/max/1024/1*S7g0C02wCQdE1ORAKjR8Fw.png)

Once you click on Store Listing, it will ask for the App name, description, app icon, and for few screenshots of the app on the device/simulator.

![](https://cdn-images-1.medium.com/max/1024/1*ujvZCzs-fLyOn-r8q7rl9g.png)

Click on “Save” to submit the Store information and go back to **Release Overview** and Continue there.

Once you are done with all the information — click on “Review Release”. Then check all the information before submitting the app. Clicking “Submit” will submit your app to the Google team for review. It will take some days for review and after that, your application will be released to the Play Store 🚀.

![](https://cdn-images-1.medium.com/max/1024/1*bqZpxT-e0BzOVAKeg4hWUQ.jpeg)

### Conclusion

Now our Android Application is being deployed to the Google Play Store. You can share the link to the app with the users, so they can download the application and use it. Stay tuned to [**_Enappd Blogs_**](https://enappd.com/blog/) for more Awesome Blogs.

### Next Steps

If you liked this blog, you will also find the following blogs interesting and helpful. Feel free to ask any questions in the comment section

### Ionic Capacitor

- **Basic**  — [Geolocation](https://enappd.com/blog/use-geolocation-geocoding-and-reverse-geocoding-in-ionic-capacitor/131) | [Barcode & QR code](https://enappd.com/blog/qr-code-and-barcode-scanning-with-ionic-capacitor/127) | [Facebook Login](https://enappd.com/blog/facebook-login-in-capacitor-apps-with-ionic-angular/128) (Angular) | [Facebook Login (React)](https://enappd.com/blog/facebook-login-in-ionic-react-capacitor-apps/118) | [Icon and Splash](https://enappd.com/blog/icon-splash-in-ionic-react-capacitor-apps/114) | [Camera & Photo Gallery](https://enappd.com/blog/camera-and-gallery-in-ionic-react-app-using-capacitor/110) | [Debugging with browser](https://enappd.com/blog/debugging-ionic-apps-using-chrome-and-safari-developers-tools/167)|Theming in Ionic apps
- **Advanced**  — [AdMob](https://enappd.com/blog/implement-admob-in-ionic-react-capacitor-apps/135) | [Local Notifications](https://enappd.com/blog/local-notifications-in-ionic-5-capacitor/132) | [Google Login](https://enappd.com/blog/google-login-in-ionic-react-capacitor-apps/122) | [Twitter Login](https://enappd.com/blog/twitter-login-in-ionic-react-capacitor-app/121) | [Games using Phaser](https://enappd.com/blog/html5-games-in-ionic-capacitor-using-phaser/115) | [Play music](https://enappd.com/blog/play-music-in-ionic-capacitor-apps/112) | [Push Notifications](https://enappd.com/blog/firebase-push-notification-in-ionic-react-capacitor/111)

### Ionic Cordova

- [Taxi Booking App example with Ionic, Node, Express and MySQL](https://enappd.com/blog/ionic-app-with-nodejs-express-mysql-sequelize-taxi-app/160)
- Ionic Payment Gateways — [Stripe with Firebase](https://enappd.com/blog/integrate-stripe-payment-gateway-in-ionic-5-apps-and-pwa-using-firebase/158) | [Stripe with NodeJS](https://enappd.com/blog/ionic-5-stripe-payment-integration-firebase-cloud-functions-vs-node-express-based-server/159) | [PayPal](https://enappd.com/blog/paypal-integration-in-ionic-apps-and-pwa/142) | [Apple Pay](https://enappd.com/blog/how-to-integrate-apple-pay-in-ionic-4-apps/21) | [RazorPay](https://enappd.com/blog/how-to-integrate-razorpay-in-ionic-4-apps-and-pwa/20)
- Ionic Charts with — [Google Charts](https://enappd.com/blog/ionic-4-charts-using-google-charts/66)| [HighCharts](https://enappd.com/blog/adding-charts-in-ionic-4-apps-and-pwa-part-3/60) | [d3.js](https://enappd.com/blog/adding-charts-in-ionic-4-apps-and-pwa-part-2/54) | [Chart.js](https://enappd.com/blog/charts-in-ionic-4-apps-and-pwa-part-1/52)
- Ionic Authentications — [Via Email](https://enappd.com/blog/firebase-email-authentication-in-ionic-apps/153) | [Anonymous](https://enappd.com/blog/implement-anonymous-login-in-ionic-apps-with-firebase/154) | [Facebook](https://enappd.com/blog/facebook-login-in-ionic-apps-using-firebase/150) | [Google](https://enappd.com/blog/implement-google-login-in-ionic-apps-using-firebase/147) | [Twitter](https://enappd.com/blog/twitter-login-in-ionic-4-apps-using-firebase/24) | [Via Phone](https://enappd.com/blog/firebase-phone-authentication-in-ionic-5-apps/169)
- Ionic Features — [Geolocation](https://enappd.com/blog/ionic-5-complete-guide-on-geolocation/141)| [QR Code reader](https://enappd.com/blog/ionic-complete-guide-barcode-qrcode-scan/140) | [Pedometer](https://enappd.com/blog/best-fitness-plugins-for-ionic-4-how-to-use-pedometer/15)| [Signature](https://enappd.com/blog/implement-signature-pad-in-ionic-apps/145) [Pad](https://enappd.com/blog/implement-signature-pad-in-ionic-apps/145) | [Background Geolocation](https://enappd.com/blog/using-background-geolocation-in-ionic-angular-apps/165)
- Media in Ionic — [Audio](https://enappd.com/blog/spotify-like-music-in-ionic-4-apps/48) | [Video](https://enappd.com/blog/adding-video-player-in-ionic-4-app/64) | [Image Picker](https://enappd.com/blog/camera-and-image-picker-in-ionic-apps/148) | [Image Cropper](https://enappd.com/blog/how-to-add-image-cropper-in-ionic-apps/149)
- Ionic Essentials — [Debugging with browser](https://enappd.com/blog/debugging-ionic-apps-using-chrome-and-safari-developers-tools/167)| [Native Storage](https://enappd.com/blog/ionic-4-save-and-retrieve-data-locally-on-device/59) | [Translations](https://enappd.com/blog/how-to-translate-in-ionic-internationalization-and-localization/143) | [RTL](https://enappd.com/blog/how-to-use-rtl-right-to-left-in-ionic-apps-pwa/152) | [Sentry Error Monitoring](https://enappd.com/blog/using-sentry-error-monitoring-with-ionic-angular-applications/164) | [Social sharing](https://enappd.com/blog/social-sharing-component-in-ionic-5-mobile-web-apps/168)
- Ionic messaging — [Firebase Push](https://enappd.com/blog/how-to-implement-firebase-push-notifications-in-ionic-apps/157) | [Reading SMS](https://enappd.com/blog/automatically-read-sms-in-ionic-4-apps/42) | [Local Notifications](https://enappd.com/blog/local-notifications-in-ionic-5-capacitor/132)
- Ionic with Firebase — [Basics](https://enappd.com/blog/how-to-integrate-firebase-in-ionic-4-apps/23) | [Hosting and DB](https://enappd.com/blog/firebase-with-ionic-4-hosting-auth-and-db-connection/58) | [Cloud functions](https://enappd.com/blog/firebase-cloud-functions-in-ionic-5-complete-guide/166) | [Deploy App to Firebase](https://enappd.com/blog/github-actions-deploying-ionic-angular-app-to-firebase-hosting/146) | [Firebase simulator](https://enappd.com/blog/how-to-use-firebase-emulators-with-ionic-angular-applications/163)
- Unit Testing in Ionic — [Part 1](https://enappd.com/blog/beginners-guide-to-ionic-angular-unit-testing-part-1/151) | [Mocks & Spies](https://enappd.com/blog/beginners-guide-to-ionic-angular-unit-testing-part-2-mocks-and-spies/155)| [Async Testing](https://enappd.com/blog/beginners-guide-to-ionic-angular-unit-testing-async-testing/156)

### Ionic React Full App with Capacitor

If you need a base to start your next Ionic 5 React Capacitor app, you can make your next awesome app using [Ionic 5 React Full App in Capacitor](https://store.enappd.com/product/ionic-react-full-app-capacitor/)

![Ionic 5 React Full App in Capacitor from Enappd](https://cdn-images-1.medium.com/max/760/1*G3yOFVX4oABx9MhUy-3kng.png)

### Ionic Capacitor Full App (Angular)

If you need a base to start your next Angular **Capacitor app** , you can make your next awesome app using [Capacitor Full App](https://store.enappd.com/product/capacitor-full-app-with-ionic-angular/)

![Capacitor Full App with huge number of layouts and features](https://cdn-images-1.medium.com/max/736/0*UwSHcofTMStMnzAX.png)

### Ionic Full App (Angular and Cordova)

If you need a base to start your next Ionic 5 app, you can make your next awesome app using [Ionic 5 Full App](https://store.enappd.com/product/ionic-full-app)

![Ionic Full App with huge number of layouts and features](https://cdn-images-1.medium.com/max/700/0*1ArpKyhiDHZnevwB.jpeg)

* * *