How to be an Android Developer with just 7 taps. Deep Dive 🔎

Search for a command to run...

No comments yet. Be the first to comment.
👋🏽 Hello there, I recently moved my primary blog at hossain.dev GitHub's Spark is a fantastic starting point for building modern React applications that uses spark-template as starting point. Once
👋🏽 Hello there, I recently moved my primary blog at hossain.dev TL;DR: I let AI write a JSON5 parser for me using just test cases and vibes. No deep knowledge, just TDD and Agentic AIs. Shockingly

👋🏽 Hello there, I recently moved my primary blog at hossain.dev Building is more fun with AI 🤖 I’ve had my GitHub Copilot subscription for over a year now, but I haven’t leveraged the service unti

👋🏽 Hello there, I recently moved my primary blog at https://hossain.dev/ Have you ever needed to save your Android Logcat logs for later analysis? I recently built a service-based Android app, and

👋🏽 Hello there, I recently moved my primary blog at https://hossain.dev/ ℹ️ This is part of the self-learning log as I explore Docker and Portainer. Recently, I have been playing with Portainer — a

DISCLAIMER: This is a non-technical just-for-fun post!
In the past few years, the Android ecosystem has exploded with lots of tools, libraries, and architecture guidelines. Recently, with I/O 2017 announcement of Kotlin support, it just added another dimension.
Today, I am going to show you quickest way of becoming an Android Developer regardless of language and plethora of libraries, all you need is a physical Android device.
On your device, go to Settings > About and find “Build Number”
p.s. The “Build Number” may be burried under additional sub section based on device manufacturer like LG, Samsung, HTC and so on. You just need to find it 🤓.
Now, all you need to do is keep tapping the build number value until it says you have become a developer. And that’s it!
Here is how I became a developer using my Pixel 2 XL device:
A short clip showcasing how to enable ‘Developer options’
If you made this far, you know this is a joke 🙈! By now, every Android devs know how to activate the developer options on any Android device.
However, back in the days, there was no tapping required to activate it, it was always there. So, when they added this feature, I’ll be honest, I did have to Google for it 😁.
As I was curious, I wanted to see how the logic works in the Android settings screen. I found that all these logic of activating the developer options is in BuildNumberPreferenceController.java (AOSP) source code.
First, the most important constant that defines how many times we have to tap to become the ‘developer’ is:
static final int TAPS_TO_BE_A_DEVELOPER = 7;
Why 7? Maybe because it’s considered a lucky number? ¯\_(ツ)_/¯
Here some of the pre-conditions that have to be met before developer settings can be activated by tapping 7 times on the build number.
After these requirements are met, all there is left to do is count-down the number of taps. Here is a simplified code snapshot with some added inline comments:
if (mDevHitCountdown > 0) {
mDevHitCountdown--;
if (mDevHitCountdown == 0 && !mProcessingLastDevHit) {
// Open the lock screen validation screen before activating
mProcessingLastDevHit = helper.launchConfirmationActivity();
if (!mProcessingLastDevHit) {
// Activates developer settings after lock verification
enableDevelopmentSettings();
}
} else if (mDevHitCountdown > 0
&& mDevHitCountdown < (TAPS_TO_BE_A_DEVELOPER - 2)) {
// Show - "You are X taps away from being developer."
mDevHitToast = Toast.makeText(getQuantityString(
R.plurals.show_dev_countdown,
mDevHitCountdown,
mDevHitCountdown),
Toast.LENGTH_SHORT);
mDevHitToast.show();
}
} else if (mDevHitCountdown < 0) {
// This means, you have already tapped 7 times, you're a DEV!
mDevHitToast = Toast.makeText(R.string.show_dev_already,
Toast.LENGTH_LONG);
mDevHitToast.show();
}
That’s it, mystery solved 🎉