How to release a bug-free Android App in production?

Amit Shekhar
Nov 12, 2018 · 5 min read
Image for post
Image for post
https://mindorks.com

Recently, Our team has tried a few things to keep the bugs as less as possible. In this post, we will be talking about the few things which you can do to keep bugs as less as possible.

Nothing is perfect

Refer to the Android App Release Checklist

We referred our previous article on Android App Release Checklist For The Production Launch so that we do not miss anything while doing the production release.

Do not release the Android App in production with a debugging library

Check for any debugging library. A debugging library should not go into the production release. To prevent this, use debugImplementation instead of the implementation for the debugging library in your gradle file. As an example, in the app, we use the Android Debug Database for debugging Android databases and shared preferences. We have added the library in the gradle as below.

debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'

Keep feature flag

Always keep the feature flag for any new feature which you have added to turn it on and off as per requirement. Try to roll out the new feature to a small segment of users to check how stable the feature is. Then on the basis of stability, increase or decrease the rollout percentage. There are many ways to do it. You can use the Remote Config provided by Firebase or the percentage rollout while releasing the APK from the Google Play Console.

Make things server-side configurable

  • Make important variables value server-side configurable. Many times, we use some variables in the code which is important but we do not know what should be the best value of it for better user experience. By changing the values of those variables from the server, we can run the experiment and know the best value after some user feedback. Here you can use the Remote Config provided by Firebase.

As an example, In our app, we ask the user for their interest after showing a certain number of posts (content) to the user. But we are not sure about the number. We make it server configurable by using the Remote Config. Now, we are running the experiment like below:

  1. Show at the start position(0) for the 1/3 users.
  2. Show at the 10th position for the 1/3 users.
  3. Never show it to the 1/3 users, as our app also has the smart algorithm to know the user's interest on the basis of the post seen, liked, shared, bookmarked by the users.

Check for production keys

Check for all the production keys used in the Application. Do not release anything with the debug key.

Check for extra permissions

Check if you have added any extra permission to the new release or not. As an external library can add extra permission. And the user will be seeing it on Google Play.

Add crash reporting library

Check if you have added the crash reporting library correctly in your Android application or not. You should verify if the key is correct for the production or not.

Also check out the crash reporting libraries on MindOrks Android Store.

Check for proguard

  • Check if you added the Proguard rules for the new libraries or not if it is required.
  • Check if your app is working perfectly after applying the pro-guard as it was intended.

Check for all the edge-cases

Check your code for all the edge-cases. Like in our app, what if the user has seen all the posts. Although the app has infinite content, we have handled these types of cases.

Check for deep links

Check if you have added the deep link for your new page. As sometimes, you need to take your user to the intended page that you want after clicking on a shared link. In our application, if a user(A) shares a post(P) to another user(B). When the user(B) clicks on the link, he/she should land on the same post(P) in the Android application.

Check for SHA1 or hash key

Check if have you added the SHA1 or hash key created from the release Keystore or not for Firebase, Facebook, and etc.

Handle no internet connection

Check if you have added the check for internet connection at the appropriate places or not.

Handle returning user case

Check if you have handled the case of returning the user or not. You may need to pull the old data specific to that user from the server as the user had uninstalled the app once and reinstalled again with the same identity. In our app, we fetch the user interest data as the user has already provided us once.

Handle Memory Leaks

Code in a way that there are no memory leaks. Check this blog on Detecting and fixing memory leaks in android.

Handle Notification Data Correctly

Check if you have handled the Notification data correctly or not. The app should not crash if there is anything wrong with data coming in the notification.

Update testing

Do update testing on the previous few releases. Do not forget to update the database version if you have made any changes to the new release in the database.

Test on different devices

  • Test your Android App on as many different devices as you can.
  • Check if all the animations are working fine on different devices or not.
  • Check if your app is using an API that is not available for the version which your app does not support.

Check the newly added analytics

Debug the new analytics events which you have added correctly or not. Firebase analytics provide DebugView, a way to debug in real-time.

Last Step:

That’s it for now. Happy releasing bug-free Android Application :)

Check all the top articles at blog.mindorks.com

Also, Let’s become friends on Twitter, Linkedin, Github, and Facebook.

Clap, share if you like it and follow me for the updates.

MindOrks

Our community publishes stories worth reading on Android…

Amit Shekhar

Written by

Working with the smartest people in the world to change the way we learn. EdTech products: MindOrks | AfterAcademy | CuriousJr | https://amitshekhar.me

MindOrks

MindOrks

Our community publishes stories worth reading on Android Development

Amit Shekhar

Written by

Working with the smartest people in the world to change the way we learn. EdTech products: MindOrks | AfterAcademy | CuriousJr | https://amitshekhar.me

MindOrks

MindOrks

Our community publishes stories worth reading on Android Development

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store