I am trying to make the ESP8266 send messages to my android application in the form of strings that can be read by the application. I read online that one way of doing this is through printing the string on the local IP web server and then using a GET request in the android app.
Problems with that: GET request gives the entire HTML code. I only needed the string I am printing. Second, I am also sending GPS latitude and longitude. I want those to be sent to the android app. But constantly printing it on a web server is probably not ideal?
You are using a TCP/IP connection to send data. That means you cannot just send strings. You must use some kind of protocol and deal with that.
With HTTP you can send a HTML webpage with some JavaScript once and then only send data to update the page or request data updates. You do not need to send the entire webpage repeatedly. Look at XML HTTP requests. In this request you can send any text you like.
But constantly printing it on a web server is probably not ideal?
Well that depends. If you want minimal programming on the phone, using HTTP is a good option because you only need a web browser. And constantly sending stuff is what many webpages do. Just look at any interactive real-time page.
If you could provide some more detailed information about what you expect from your application, we can provide you some more pointers.
"I am trying to make the ESP8266 send messages to my android application in the form of strings that can be read by the application. I read online that one way of doing this is through printing the string on the local IP web server and then using a GET request in the android app."
Not sure if it would apply to your situation, but in the past I've made simple web pages that had iframe boxes to display data from the srduino/ethernet card server. I set the iframes to meta refresh the box data. I think I did the same with a click button in the page to refresh the data. Probably could be used with a ESP8266 setup.