Mastering the App Release(Part 1): Launching Your Android App: Key Considerations

Jogy Felix
6 min readFeb 24, 2024

Deploying applications to the App Store and Play Store is an integral part of app development. Several considerations must be kept in mind when releasing apps to these platforms. Let’s discuss some key aspects, starting with the Android app release.

Android App Release

Here, I won’t delve into the detailed, step-by-step process of app release. Instead, I’ll focus on the essential considerations developers should bear in mind when launching an app on the Play Store.

You can refer to Submitting an App to the Google Play Store: A Step-by-Step Guide by

for a walkthrough of the process of releasing an app on the Play Store.

The backbone of an Android app consists of primarily three main files that most commonly every android developer is familiar of, the AndroidManifest.xml file and the gradle files(top-level and module-level). These files contain essential information about the app, including its name, permissions, dependencies, Android SDK versions, build configurations etc. Release preparations involve primarily editing the manifest and module-level build.gradle files, utilizing Gradle and the Android Gradle Plugin.

Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process while letting you define flexible, custom build configurations.

The Android Gradle plugin(AGP) works with the build toolkit to provide processes and configurable settings that are specific to building and testing Android apps

Now let’s delve into 4 crucial aspects of Android app releases, mainly achievable by tweaking the manifest and build.gradle files.

  1. App Permissions
  2. Policies for Developers to Follow
  3. Code Shrinking and Optimization
  4. Signing for Upload and Distribution

1.App Permissions

Before releasing the app on the Google Play Store, the first consideration is the permissions the app uses. Google regularly updates Android with new SDKs and API levels, often accompanied by changes to app policies and permissions. If developers aren’t up-to-date, their apps might break. So developers must review all permissions used by their app, ensuring only necessary permissions are requested from users.

<manifest …>

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

</manifest>

You can go to the manifest file of the application for adding or removing permissions. This is an important step as it may lead to unnecessary complications later in the journey. You can find more information about permissions here.

2.Policies for Developers to Follow

Google Play has strict rules (like policies) that developers need to follow. If you break these rules, your app could be removed or even banned. These rules apply to both the app itself and any content you include in the app store listing.

My App Got Rejected Twice Before Launch — Here’s What I Learned (The Short Story)

Rejection mail sent by Google

So, I built this visitor management app called “Segment” during the pandemic. It was a good idea, perfect for lockdown times. But guess what? Google Play rejected it, twice! ‍

Turns out, I made some rookie mistakes:

Scary Virus Image: I had an illustration of the COVID virus, which violated Google’s policies (makes sense!).

Keyword Oops: I mentioned “covid” in the app description, another no-no.

Lesson learned: Read the rules! Google Play has strict policies to protect users, and I missed them.

Third time’s the charm: After fixing these issues and updating my app (including a new name! Skidlog), it finally got published.

P.S. Want to know more about app store policies? Check out the link

3.Code Shrinking and Optimization

Before delving into the process of generating an APK/AAB build, certain things need consideration:

  1. Obfuscation and Minifying
  2. Pro-guard Rules
  3. Upload Key and App Signing Key

1.Obfuscation and Minifying

Let’s dive into the four key areas for optimizing your final build: shrinking, resource shrinking, code obfuscation, and optimization.

Only what is necessary is included

Shrinking : detects and safely removes unused classes, fields, methods, and attributes from your app and its library dependencies.

  • Imagine a toolbox with tons of tools you barely use. Shrinking removes unused code and features, just like keeping only the tools you need.
  • This is especially helpful for apps with lots of libraries.

Resource shrinking: removes unused resources from your packaged app, including unused resources in your app’s library dependencies.

  • Think of resources like images, sounds, and layouts used in your app. Resource shrinking removes unused ones, like cleaning out old files.
  • It works hand-in-hand with code shrinking for maximum slimming.

Obfuscation: shortens the name of classes and members, which results in reduced DEX file sizes.

  • Obfuscation renames code parts, like giving nicknames to your tools. This shrinks the app size.
  • It’s like using code-names.

DEX is a file format used to store compiled Android application code.

Optimization: inspects and rewrites your code to further reduce the size of your app’s DEX files. For example, If your code never takes the else {} branch for a given if/else statement, it removes the code for the else {} branch.

  • Optimization takes a close look at your code and streamlines it.
  • For example, it removes unnecessary code paths you never use.

Code shrinking, obfuscation and optimization with R8 is enabled by default when you set the minifyEnabled property to true. For resource shrinking as it works in conjunction with code shrinking, it also requires the minifyEnabled property to be true.

android {
buildTypes {
getByName("release") {
// Enables code shrinking, obfuscation, and optimization for only
// your project's release build type. Make sure to use a build
// variant with `isDebuggable=false`.
isMinifyEnabled = true

// Enables resource shrinking, which is performed by the
// Android Gradle plugin.
isShrinkResources = true

// Includes the default ProGuard rules files that are packaged with
// the Android Gradle plugin. To learn more, go to the section about
// R8 configuration files.
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
...
}

R8 in Android Studio is a powerful compiler that plays a crucial role in optimizing your app for release.

2.Pro-guard Rules

Pro-guard and R8 serve the same purpose of reducing APK size by removing unused code and resources. R8 is an updated and more efficient version of Pro-guard, but Pro-guard rules are still necessary for customizing R8’s behavior. In fact, R8 works with all of existing ProGuard rules files.

Does Enabling minification leads to app crashes in production!

Many developers encounter app crashes in production builds simply because they enabled minification. Instead, you can fine-tune minification by writing Pro-Guard rules, which tell the R8 tool (modern minifier) what parts of your code to keep instead of removing.

This gets a bit more technical, so I’ll cover it in a separate blog post on efficiently writing pro guard rules. In the meantime, you can learn more about Android build optimization at the official Android Developer documentation: link

3.Upload Key and App Signing Key

When releasing an Android app, two crucial concepts come into play: the App Signing Key and the Upload Key.

  • Upload Key: This key is used only to sign your app before uploading it to the Play Store. It acts like a password, verifying your ownership and ensuring Google can authenticate your app. Keep this key confidential! You can generate it directly in Android Studio. When an upload key is generated, it is stored in a key-store along with the certificate.

A Key-store is a digital file that securely stores cryptographic keys and certificates, including your upload key. It acts as a vault, protecting your key from unauthorized access.

  • App Signing Key: This key is the heart of your app’s security. It’s used to sign the APKs installed on user devices and verifies the app’s authenticity throughout its lifespan. Like the Upload Key, keep this one top secret!

Play App Signing:

This is where Google steps in! With Play App Signing, Google securely manages your App Signing Key for you. You don’t have to worry about its safekeeping and potential compromises. Google uses this key to sign your APKs for distribution, ensuring their integrity and authenticity.

The key you use to sign your first release becomes your upload key, and you should use it to sign future releases. Since app signing key is managed by google, you can rest assured.

Want to dive deeper?

Check out the official Android developer guide for more details: link

Conclusion

That’s it! By addressing these key areas, you’ll be well-equipped to confidently launch your app onto the Play Store and reach your target audience. In the next blog, we will discuss key areas of iOS app deployment to the App Store.

--

--

Jogy Felix

React Native dev by day, crafting UX and animations. By night, I'm a pianist.