StrictMode is a developer tool which can be used to detects errors that are very hard to identify. Generally it detects things you might be doing by accident.
StrictMode is a handy way to catch accidental disk or network access on the application’s main thread. You can make much smoother/responsive UI, prevent ANR dialogs from being shown to users by keeping disk and network operations off the main thread. To enable strict mode just place the following code inside onCreate() method of your activity.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskReads() .detectDiskWrites() .detectNetwork() // or .detectAll() for all detectable problems .penaltyLog() .build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() .detectLeakedSqlLiteObjects() .detectLeakedClosableObjects() .penaltyLog() .penaltyDeath() .build()); }