Did you encounter this error? If you want to disable this check then add this code to your main activity and call DisableStrictMode.
Oops sorry
@Erel, I missed this question.
Example 1. To tell you the truth on my Nexus 4, 5 and 7(2013) I never never received any errors or issues, the same for my Samsung Galaxy S4, Tab 3 10.1, HTS Desire and Acer Iconia, all works perfectly fine. But I was getting crashing issues from users saying that my widget kept stopping and hanging(it receives both XML and JSON feeds from the internet), these were mainly from 95%+ Samsung users. These issues went on for months until I found this thread not long after you originality posted it. Because I was completely lost and had no idea what to do, I blindly added the DisableStrictMode Sub routing and called it before starting anything else. I released an update to my widget onto the Play Store and all of a sudden I was getting positive user feedback saying that my widget was working perfect

. My main issue was that I have an S4 running smoothly with my widget, but I was constantly getting crash reports from S4 devices among other

, but I don't remember seeing NetworkOnMainThread exception in the reports. I personally have never seen any NetworkOnMainThread exceptions, but your Java code fixed my customers issues on the Play Store.
I personally have not seen any NetworkOnMainThread exception crashed on my devices, even in the above example using the same S4 device that others that were having issues
Example 2. I faithfully use the following MySQL library and have done so for 2+ years
https://www.b4x.com/android/forum/threads/mysql-library-with-jdbc.22291/#content, my only issue was that I couldn't use SDK 9+. When I set the SDK to 9+, all that would happen is that I would not receive any data from my query. Once again I had no crashes or errors, just no data would be received. I added your DisableStrictMode Sub to this library and SDK 9+ suddenly started working. Myself and my clients have never had any issues whatsoever with the GUI or anything else with this library on SDK 21 and using your DisableStrictMode Sub. Once again your DisableStrictMode worked and saved the day. Yes I already know what you think about these libraries...
Thank you
@Erel 