BitRadar is a powerful Android application designed to monitor and visualize your device's connectivity environment. It provides real-time insights into cellular networks, Wi-Fi connections, and Bluetooth device density, helping users understand their surrounding signal landscape and potential interference.
-
Android API Documentation
- Learned how to read and utilize required classes from the official Android developer documentation.
- Gained experience navigating the API reference to find relevant methods, constants, and usage patterns.
-
TelephonyManager & Signal Strength
- Implemented
observeCellularStatusflow usingTelephonyManager. - Handled different Android versions by:
- Using
TelephonyCallbackfor API 31+. - Falling back to
PhoneStateListenerfor legacy APIs.
- Using
- Discovered that
dbmvalues are always negative (β β120 to β50) and must be normalized for UI display, where values closer to 0 indicate stronger signal strength.
- Implemented
-
Wi-Fi Connectivity & State Caching
- Built an event-driven
callbackFlowwithConnectivityManager.NetworkCallback. - Securely extracted Wi-Fi details and IPv4 addresses via
NetworkCapabilitiesandLinkProperties. - Key insight: Avoided synchronous calls (e.g.,
getLinkProperties()) inside callbacks to prevent race conditions and null data. - Instead, cached the properties supplied by the OS through
onCapabilitiesChangedandonLinkPropertiesChanged.
- Built an event-driven
-
Bluetooth LE Scanning & Permissions
- Implemented real-time Bluetooth device scanning using
BluetoothLeScannerviacallbackFlow. - Managed complex permission requirements across Android versions:
- Added legacy
BLUETOOTHandBLUETOOTH_ADMINmanifest flags for Android 11 and below. - Used
BLUETOOTH_SCANdynamically for Android 12+.
- Added legacy
- Handled the volatile nature of BLE scans by mapping devices by MAC address (
Map<String, Pair<BluetoothDevice, Long>>) to avoid duplicates. - Developed a "device aging" system that compares timestamps (
System.currentTimeMillis()) inside a coroutine polling loop to remove inactive devices that haven't been seen in the last 10 seconds.
- Implemented real-time Bluetooth device scanning using
-
Permission Handling & Rationale Strategy
- Designed a granular permission request system with specialized rationale dialogs (
PermissionRationaleDialog) for Cellular, Wi-Fi, and Bluetooth, integrating directly within individual component cards. - Used Accompanist's permissions library to manage
MultiplePermissionsState, properly distinguishing between first-time requests, rationale needs, and permanent denials (guiding users to App Settings). - Adopted the principle of least privilege by pruning unnecessary permissions (like
READ_PHONE_STATE) to match exact API requirements.
- Designed a granular permission request system with specialized rationale dialogs (
-
Adaptive Layouts with WindowSizeClass
- Upgraded from manual screen width calculations (
BoxWithConstraints) to the officialWindowSizeClassAPI (androidx.compose.material3:material3-window-size-class). - Implemented
calculateWindowSizeClass()at the root activity level and passed downWindowWidthSizeClassconfigurations to Composable screens. - Successfully mapped
WindowWidthSizeClass.Compactto mobile layouts and larger size classes to expanded adaptive tablet layouts, improving rendering predictability and matching Material 3 guidelines.
- Upgraded from manual screen width calculations (
-
Firebase Integration & Security
- Discovered that integrating Firebase libraries (like Crashlytics and Analytics) automatically merges the
INTERNETpermission into the final manifest, requiring no manual declaration. - Security Best Practice: After creating a Firebase project, secured the infrastructure by navigating to the Google Cloud Console and explicitly disabling all unused Google APIs.
- Enforced strict credential restrictions by binding API keys specifically to the app's Android application ID and restricting usage via SHA-1 signing certificate fingerprints.
- Discovered that integrating Firebase libraries (like Crashlytics and Analytics) automatically merges the
-
Google Play Publishing & Closed Testing
- Managed the Google Play Store deployment from scratch, including creating a new Play Console account and submitting all required legal documentation.
- Learned that account verification from Google Play can take more than 1 working day.
- Navigated stricter app submission requirements, including the mandatory provision of a latest privacy policy.
- Successfully managed the app's website and landing page by collaborating with AI, including generating app store listing images and drafting the long description.
- Met the mandatory independent testing requirements: acquiring a minimum of 12 opted-in testers for 14 continuous days (Testing Requirements Guide).
- Realized that publishing even a simple app involves a strict compliance process and mandatory questionnaires from Google Play before production launch, significantly extending the time to market.
- Enrolled in the Android Developer Verification Program to become a recognized, verified developer. This is crucial as it's being enforced first in select countries (Brazil, Singapore, Indonesia, and Thailand) ahead of a global rollout.
BitRadar is currently in closed testing, and I'd be absolutely thrilled if you'd like to help me test it! If you're interested in joining the testing program, you can find more information and register at the official website: bitradar.ruang.work