Mindblown: a blog about philosophy.

  • Application Crash Reporting for Android

    ACRA is a Google library that allows your Android applications to automatically log unhandled exceptions or application crashes to a Google document and/or display Toast notifications. To use it, you’ll need to create an Application class at the root of your Android application. This class will be used to log any uncaught or unhandled Exceptions,…

  • Building a Custom Multi-Line ListView in Android

    This tutorial will walk you through building a custom multi-line ListView in Android. We’ll achieve this by extending BaseAdapter (or concrete ArrayAdapter) to turn a collection of objects into individual ListView items. First, let’s define the layout for our scrollable ListView by placing the following in main.xml: [xml] <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"…

  • Android USB Debugging on Ubuntu Linux 11.10

    I recently set up a new development machine with Ubuntu Linux 11.10, but ran into this problem trying to list connected Android devices with the adb command: [code] ./adb devices List of devices attached ???????????? no permissions [/code] To fix this, just run these commands from your SDK/platform-tools folder to restart the ADB server with…

  • Removing Shadows From Android Map Overlay Items

    Removing the default drop-shadows from Android map overlay items is simple, but not well documented. Just override the draw method in your overlay class, and pass false for the shadow boolean: [java] @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, false); return true; } [/java] Make sure to return…

  • Team Development With Google Maps

    Android development with Google Maps requires you to generate an API key using the MD5 fingerprint of your keystore certificate. If there are several people on your team, it’s likely you’ll all have different debug.keystore files, and subsequently different API keys. To fix this you should share your keystore file in something like Dropbox or…

  • Debugging an Android Thread / Service

    Trying to debug an Android application recently, Eclipse wasn’t stopping on my breakpoints following an asynchronous / threaded API call. This single line of code solved my problem: [java] android.os.Debug.waitForDebugger(); [/java] This will cause the Android Debugger to attach even after launching the application normally. Hope this helps!

Got any book recommendations?