Android NetworkOnMainThreadException at StrictMode fix (with deprecated methods used)

A JSON Parser developed by some members of the Android dev team. But a few weeks after completion of the parser, several methods became deprecated.

And when we use that parser, we get errors. Part of the stack trace is as follows:

Not sure if the NetworkOnMainThreadException is being thrown because of the deprecated methods but the following code is what prevents our app from getting the error.

Catzie

A Filipino who is a mobile & web developer on weekdays, and a baker on weekends. When I have time to spare, I blog, play video games, watch series (usually anime), cook dishes, draw, or spend a little time with pets. I also like traveling and recording song covers, but I only do so occasionally. Follow on Twitter: @catzie

Leave a Reply

Your email address will not be published. Required fields are marked *