Android uncaught exception handler and ANR
While trying to install a custom exception handler to catch uncaught exceptions (crashes), I ended up writing
Technology, books, travel, and linguistics
While trying to install a custom exception handler to catch uncaught exceptions (crashes), I ended up writing
Google Play Music was great. Apart from one missing feature about the inability to upload music from the phone to the Google Play Music library, I had no other complaints. Then it was forcefully shut down.
On Android catching Java exceptions is easy via UncaughtExceptionHandler. Catching NDK crashes is a bit more convoluted. Since the native stack is probably corrupted, you want the crash handler to run on a separate process. Also, since the system might […]
If you are building an app that uses the user’s contact book then their certain gotchas to avoid. Telephone country codes are prefix-free If a country has a country code “+91”, then no other country will get a country code […]
Emulator: Process finished with exit code 1 You opened AVD Manager in Android Studio and tried to start an AVD, you got “Emulator: Process finished with exit code 1”. Following are the steps to debug this Find out the name […]
Die with me is a chat app which can be used only when the phone’s battery is below 5%. Here is a fun way to use the app without draining your phone’s battery. Connect the phone via ADB or start Android […]
Update: As of Mar 2022, I recommend everyone to use GitHub Actions I maintain a somewhat popular Android developer tool (adb-enhanced). The tool is written in Python, supporting both Python 2 and 3. Testing the tool requires both Python runtime […]
WebView debugging can be enabled via “WebView.setWebContentsDebuggingEnabled(true)”. Leaving WebView debugging enabled in production Android apps is a bad idea. Anyone who gets hold of the unlocked phone can access the app’s data forever.
Don’t use platform fragments (android.app.Fragment), they have been deprecated and can trigger version-specific bugs. Use the support library fragments (android.support.v4.app.Fragment) instead. A Fragment is created explicitly via your code or recreated implicitly by the FragmentManager. The FragmentManager can only recreate […]
A JPEG file can have Exif metadata which can provide the rotation/translation field information for a raw JPEG image. So, a landscape raw JPEG image could actually be a portrait because it’s EXIF orientation could be set to ORIENTATION_ROTATE_90, the best way to […]