Android NetworkOnMainThreadException at StrictMode fix (with deprecated methods used)

Written by

on

in

, ,

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.

Related Posts

About the author:

Catzie Avatar

The homo sapiens behind these blog posts is “Catzie“

Explore my top blog posts:

Comments

Leave a Reply

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