Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Kotlin for Android 14

You're reading from  Mastering Kotlin for Android 14

Product type Book
Published in Apr 2024
Publisher Packt
ISBN-13 9781837631711
Pages 370 pages
Edition 1st Edition
Languages
Author (1):
Harun Wangereka Harun Wangereka
Profile icon Harun Wangereka

Table of Contents (22) Chapters

Preface 1. Part 1: Building Your App
2. Chapter 1: Get Started with Kotlin Android Development 3. Chapter 2: Creating Your First Android App 4. Chapter 3: Jetpack Compose Layout Basics 5. Chapter 4: Design with Material Design 3 6. Part 2: Using Advanced Features
7. Chapter 5: Architect Your App 8. Chapter 6: Network Calls with Kotlin Coroutines 9. Chapter 7: Navigating within Your App 10. Chapter 8: Persisting Data Locally and Doing Background Work 11. Chapter 9: Runtime Permissions 12. Part 3: Code Analysis and Tests
13. Chapter 10: Debugging Your App 14. Chapter 11: Enhancing Code Quality 15. Chapter 12: Testing Your App 16. Part 4: Publishing Your App
17. Chapter 13: Publishing Your App 18. Chapter 14: Continuous Integration and Continuous Deployment 19. Chapter 15: Improving Your App 20. Index 21. Other Books You May Enjoy

Publishing Your App

Once our remarkable applications have been developed, the subsequent phase involves delivering these apps to our intended audience. This is accomplished by releasing our apps on the Google Play Store. This chapter will focus on the process of doing so.

In this chapter, we will learn step-by-step how to publish a new app in the Google Play Store. We will walk through how to create a signed app bundle and things such as answering questions about the content of our app, creating releases, setting up how users will access our app – either via controlled testing tracks or publicly, and much more. All this is required for us to publish our first app to the Play Store. Additionally, we will learn about some of the Google Play Store policies and how to always stay compliant to avoid our apps being removed or our accounts being banned.

In this chapter, we’re going to cover the following main topics:

  • Preparing our app for release
  • Releasing...

Technical requirements

To follow the instructions in this chapter, you will need to have Android Studio Hedgehog or later (https://developer.android.com/studio) downloaded.

You can use the previous chapter’s code to follow the instructions in this chapter. You can find the code for this chapter on GitHub (https://github.com/PacktPublishing/Mastering-Kotlin-for-Android/tree/main/chapterthirteen).

Preparing our app for release

Before we upload our app to the Google Play Store, we have to do several things to prepare it for release. I have a checklist that I go through every time I release an app. We will be going through the checklist in this section. The checklist helps ensure that we do not forget anything as we release our app and that the app is functional. We will be tackling some of the checklist items later, in Chapter 15 of this book, but they are worth mentioning here.

Here is the checklist:

  • Add analytics to your app
  • Add crash reporting to your app
  • Turn off logging and debugging
  • Internationalize and localize your app
  • Improve error messages
  • Test your app on different devices
  • Provide proper feedback channels
  • Reduce the size of your app
  • Use Android App Bundle
  • Enable minification and obfuscation

Now, let us learn about each of these items in greater detail.

Add analytics to your app

Adding analytics to an app helps...

Releasing our app to the Google Play Store

Before you can publish apps to the Google Play Store, you need to have a developer account. You can get one by signing up on Google Play (https://play.google.com/console/signup).

You can either create an account for yourself or your organization as shown here:

Figure 13.8 – Creating a developer account

Figure 13.8 – Creating a developer account

Choosing the Yourself option shows the instructions for creating an account for yourself:

Figure 13.9 – Creating a developer account for yourself

Figure 13.9 – Creating a developer account for yourself

As shown in the preceding screenshot, you need an email address where users can reach out to you and another one where Google Play can reach out to you. You also need to pay a lifetime registration fee of USD 25 for the Google Play account. If you don’t have an account, you can proceed with the purchase as it is a very straightforward process.

Once you open a Google Play Console account, you will be presented with...

An overview of Google Play Store policies

Google Play policies are part of our releases. As such, we developers must be aware of most of them, if not all. This is because if we violate any of the policies, our app could be removed from the Google Play Store. We also need to be aware of them since some of them influence how we develop our apps.

In this section, we will look at some of the policies we need to be aware of as we develop our apps:

  • Background location access: Apps are restricted from accessing the user’s location in the background unless they are delivering a high-quality, beneficial user experience. This is to ensure that apps do not drain the battery of the user’s device. If your app needs to access location in the background, you must provide a compelling reason why it needs to access location in the background. You also must provide a privacy policy that explains how you are using the location data that you are collecting.
  • Data safety: With...

Summary

In this chapter, we have learned step-by-step how to publish a new app in the Google Play Store. We walked through how to create a signed app bundle and the things required for us to publish our first app to the Google Play Store. Additionally, we learned about some of the Google Play Store policies and how to always stay compliant to avoid our apps being removed or accounts being banned.

In the next chapter, we will learn how to use GitHub Actions to automate some manual tasks such as deploying new builds to the Play Store. We will learn how to run tests on Continous Integration and Continous Delivery (CI/CD) pipelines and push builds to the Google Play Store using GitHub Actions.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Mastering Kotlin for Android 14
Published in: Apr 2024 Publisher: Packt ISBN-13: 9781837631711
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}