I was googleing the enableing StrictMode prior 2.3 but I couldn't find anything useful. All I found was that StrictMode is introduced in 2.3 and you can use reflection to check if there is strict mode like this
try {
Class sMode = Class.forName("android.os.StrictMode");
Method enableDefaults = sMode.getMethod("enableDefaults");
enableDefaults.invoke(null);
}
catch(Exception e) {
// StrictMode not supported on this device, punt
Log.v("StrictMode", "... not supported. Skipping...");
}
But is there any way to enable strict mode in versions prior 2.3 ? For example Fragments api is for 3.0 but with fragments api library included in code there is option to use fragments with all versions above 1.6. Is there something like this for strict mode ? or is there any workaround to use strict mode in versions prior 2.3 ?
Thanks