Lynxbee topic

Android

Serve Different WordPress Themes on Mobile and Desktop Devices

While responsive Web design is standard practice, some complex sites require completely separate WordPress themes for mobile and desktop visitors. Plugins and custom PHP conditional hooks allow switching active themes based on the client device's user-agent.

Android Bluetooth Architecture: From API to HCI

A practical map of Android Bluetooth from framework APIs and Binder calls through the Bluetooth module, JNI, native host stack, vendor boundary, transport, and controller—with release-aware AOSP paths and debugging checkpoints.

Capture Android Bluetooth HCI Logs with ADB

Capture Bluetooth traffic at Android’s host-controller boundary, retrieve it through a direct ADB pull or an AOSP bug report, and inspect the BTSnoop file in Wireshark. The workflow also explains privacy risks, vendor-specific paths, and what an HCI log cannot reveal.

Turn On Bluetooth and Discoverability with ADB

ADB can open Android’s trusted system dialogs for enabling Bluetooth and temporary discoverability, but the user still controls consent. This guide shows the exact intents, duration extra, device targeting, verification, and the limits of unattended automation.

Create an Android Upload Key for Google Play

For a Play App Signing release, your upload key proves that a bundle came from your team; Google’s app-signing key signs the APKs users install. Generate them as separate identities, protect the private material, and register the correct certificate fingerprints.

Create Adaptive and Themed Android App Icons

An Android launcher icon is a layered resource, not a pre-cropped rounded PNG. Build separate foreground, background, and monochrome artwork, let the launcher apply its mask and tint, and keep the Google Play listing asset separate.

Fix RecyclerView Orientation WrongConstant

`WrongConstant` is Android lint telling you that an integer came from outside the API’s documented constant set. Use the constant family declared by the parameter, then investigate dependency or lint-version drift if an official alias is still flagged.

Fix ContextImpl Cannot Be Cast to Activity

`Context` is a capability family, not another name for `Activity`. Find the failing cast, decide whether the operation truly needs a UI owner, and change the API contract instead of swapping context methods until the crash disappears.

Prevent Screenshots in Android with FLAG_SECURE

`FLAG_SECURE` asks Android to keep a window out of screenshots and non-secure displays. Apply it before sensitive UI appears, understand its window-wide scope, and treat newer detection and screen-share APIs as complementary—not interchangeable—controls.

Read Android API Level and Build Information Safely

Android’s `Build` and `Build.VERSION` APIs expose platform and firmware metadata, but those values serve different purposes. Use the numeric API level for compatibility checks, treat display strings as diagnostics, and avoid turning hardware fields into tracking identifiers.

How Android System Properties Work Across Partitions

Android system properties are a system-wide string key/value mechanism, but they are not an unrestricted global preferences store. Reads use shared property areas; writes are validated by init’s property service and SELinux policy. Modern cross-partition contracts should use generated typed Sysprop APIs.

Build an Android AAR Library That Is Ready to Share

Creating an Android library module is the easy click. Making its AAR safe for another app requires a deliberate API, resource and manifest hygiene, consumer shrinker rules, compatibility metadata, tests, and a distribution path that preserves dependencies.

Connect Android Library Modules with Gradle

A library module can depend on another module with one Gradle project dependency. The important design choice is whether the dependency remains an implementation detail or becomes part of your public API—and how that relationship survives publication.

Add a Local AAR Dependency to an Android Project

A precompiled AAR can be linked directly from an app module, but the file carries no Maven dependency metadata. Here is the clean Gradle setup, plus the checks that prevent missing classes, resource conflicts, native ABI surprises, and release-only failures.

Fix “Invoke-customs” Android min-api 26 Build Error

This dex error usually means a module or dependency emits Java 8 invocation bytecode without compatible desugaring. First configure the module correctly; if the failing code calls MethodHandle.invoke, use the API-26-safe path instead of masking the problem.

Keep Android Immersive Mode After a PopupMenu

A PopupMenu temporarily owns window focus, so Android may reveal system bars. Use the current WindowInsets controller, track whether fullscreen remains desired, and restore bars only after focus returns or the popup is dismissed—without fighting system gestures or accessibility.

Monitor Android Network Connectivity Correctly

A connected Wi-Fi or cellular network is not proof that your server is reachable. Observe Android’s default network and capabilities, expose conservative UI state, and let each request handle DNS, TLS, timeout, authentication, and server failures independently.

Build Picture-in-Picture Video on Android

Picture-in-picture lets eligible video continue in a system-managed floating window while the user navigates elsewhere. Implement it as a player-state transition, with modern auto-entry, lifecycle-aware UI, graceful fallbacks, and device-level tests.

Test Android BOOT_COMPLETED Receivers Safely

A synthetic ADB broadcast can test receiver routing, but it does not reproduce a complete reboot. Build a minimal boot receiver, enqueue durable work, respect user-unlock and background limits, and verify both explicit broadcasts and genuine device boots.

Build Your First Android App with Kotlin and Compose

Create a small but real Android app in modern Android Studio using Kotlin and Jetpack Compose. You will choose a package and minimum SDK, understand the generated project, build stateful UI, preview and test it, deploy to an emulator or phone, inspect logs, produce a debug APK, and know what changes for release.

Fix “buildOutput.apkData must not be null” Safely

The internal `buildOutput.apkData must not be null` exception belongs mainly to older Android Studio 3.5-era builds. A project-local clean often repaired stale APK metadata, but modern diagnosis should first identify the exact Gradle wrapper, Android Gradle Plugin, JDK, IDE, task, and plugin combination.

Android Geocoder “grpc failed”: Causes and Safe Fixes

The Android Geocoder message “java.io.IOException: grpc failed” is a service failure, not proof that coordinates or permissions are wrong. Use the modern asynchronous API, keep legacy calls off the main thread, separate empty results from errors, and design a graceful fallback.

Engineering weekly

Useful technical knowledge, not inbox noise.

Receive verified fixes, references, labs, and tools. Confirm by email; unsubscribe any time.