This story is unavailable.

I believe it is a bad idea to do long running operations in a Utility class with a static method.

I would create a real class just for that network request. That class would be responsible for all the network related operations, conversions and error handling etc.

Then you can store the listener as a field just like in the example code in my article. Then it would be easy to nullify it.

What do you think?

Like what you read? Give Said Tahsin Dane a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.