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
Let’s start now
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.
Android App Release Checklist For The Production Launch
So, you have been waiting for this special day while doing a lot of hard work on your application, now you are going to…
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.
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:
- Show at the start position(0) for the 1/3 users.
- Show at the 10th position for the 1/3 users.
- 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.
Check for proguard
- Check if you have added any new model class which needs to be excluded from proguard or not. Read more about the proguard here.
Applying Proguard In An Android Application
ProGuard is a tool used to do the following in an Android application: Minify the code. Obfuscate the code. Optimize…
- 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.
Detecting and fixing memory leaks in android
Memory Leaks in Android This article is all about finding and solving memory leaks in an Android application. What is a…
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.
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.
Bookmark this article to refer again and release a bug-free Android Application.
That’s it for now. Happy releasing bug-free Android Application :)
Learning Android Development In 2019 — A Practical Guide
The New Year is here! Look ahead, embark on the road to success. May you have a great journey to your destination…
Check all the top articles at blog.mindorks.com
Clap, share if you like it and follow me for the updates.