I got a website which just response with "true" With my app I need to open that website and just get back that response. I tried for a few hours to do that with some http GET methods but nothing worked (not even plain copying of tutorials of that).
I just need to get the reponse of the website (in this case the word "true") and put it into a textview. But how to do that? I always fail at the line:
HttpResponse response = client.execute(request);
And I get errors like
Error in http connection android.os.NetworkOnMainThreadException
I tried it on Emulator and 3 Smartphones which are in the wlan and have internet access. The app has also permissions to access internet and network.
I need some help. Thank you!