Android StrictMode
Tuesday, March 06, 2012, Modified: Tuesday, March 06, 2012 Refs

Have your app flag when slow things happen on the UI thread making it unresponsive and risking an ANR termination by the system.

    StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
       .detectNetwork()   // or .detectAll() for all detectable problems
    StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
This requires a target of Android 2.3+ (API level 9).

Try Buffer, a smarter way to share links and pictures by spreading your tweets and posts out over time. Sign up from this link and we both get extra features.

Home :: Items