12 Deploying an Android app

 

This chapter covers

  • How to prepare your app to be deployed
  • How to deploy your app to the Google Play store

In the last several chapters, we’ve continued to refine the Pet Scrapbook app while teaching you about supporting multiple screen resolutions, using modals, and styling apps with themes. Now that we’ve finished adding features to the Pet Scrapbook, what’s next? Writing an app solely for the app’s sake isn’t our motivation: we aspire to share our work. And the best way to share is by publishing the Pet Scrapbook to the app stores.

Over the next three chapters, you’ll learn how to finalize apps and prepare them for the app stores. In this chapter, we’ll cover how to get ready for the Google Play store by creating app icons, a launch screen, and configuring the app for various devices. In the following two chapters, we’ll cover the same learning points, but focus on Apple’s App Store.

Let’s get started!

12.1   Customizing Android apps with the App_Resources folder

Let’s take a brief journey back to chapter 3, where you learned about the structure of a NativeScript app. You’ll recall the App_Resources folder is a special folder holding platform-specific customizations. When we first introduced this to you, we said we’d come back to it later. That time has come.

Customizations (like app icons and launch screens) are done by updating files in the App_Resources folder. There’s a lot going on under this folder, so let’s take a closer look (figure 12.1).

12.1.1   App_Resources/Android contents

12.2   AndroidManifest.xml customizations

12.2.1   App icons

12.2.2   Customizing app icons

12.2.3   Understanding app icons and the AndroidManifest.xml file

12.3   Launch Screens

12.3.1   Updating the launch screen

12.3.2   Targeting various screen sizes

12.3.3   Versioning

12.3.4   App naming

12.4   Building your app

12.4.1   Digital signatures

12.4.2   Generating a keystore file

12.4.3   Creating a release build of the Pet Scrapbook

12.5   Summary

12.6   Exercise

12.7   Solutions