StrictMode

Android 2.3 introduced a new debugging feature called StrictMode, and according to Google, this feature was used to make hundreds of improvements to the Google applications available for Android. So what does it do? It will report violations of policies related to threads and related to the virtual machine. If a policy violation is detected, you will get an alert, and that alert will include a stack trace to show you where your application was when the violation occurred. You can force a crash with the alert, or you can just log the alert and let your application carry on.

StrictMode Policies

There are two types of policies currently available with StrictMode. The first policy relates to threads and is intended mostly to run against ...

Get Pro Android 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.