title: How to fetch data from an URL in Android?
body: <p>For the app I am making I need to get data (a CSV or JSON file) from a specific URL, but I can't get it to work. It seems that I have to make the request in another thread (NetworkOnMainThreadException) but I don't know how to do that. What is the correct way to make a request to a webpage and retrieve the data?</p>