Android Strict Mode Policy : A tool to catch the bug in the Compile Time. The below Code Snippet is to setup the StrictMode for Thread Policies. This Code is to be set at the entry points to our application.


Example

StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()  
    .detectDiskWrites()  
    .penaltyLog() //Logs a message to LogCat  
    .build())