The following code is used to fetch data from my web service and store it on my app:
//GET APP INFORMATION
public static String getAppInformation() {
    String data = "";
    //test the get method data retrieval using the HttpRequest Class
    try {
        data = makeHttpRequest("http://www.mywebsite.com/abc.php?action=abc.get");
    } catch (Exception e) {
        e.printStackTrace();
    }
    return data;
}
How do I STOP getting the "android.os.NetworkOnMainThreadException" exception and also return the data variable?
 
     
    