Android app for retrieving data sent to server in real-time

The way, we use Android HTTP POST & GET request for sending and receiving data from a database(mysql) on server with php as interpreter. The same way, we can deal with ThinkSpeak API for fetching data. In this example, i have used, replacing CHANNEL_ID with the my Channel.

That is for LDR readings. Below is the exact way in which, i have created object for HTTPGET request.

HttpGet httpget = new HttpGet("");
response = httpClient.execute(httpget);
HttpEntity entity = response.getEntity();
        if (entity != null) {
                InputStream instream = entity.getContent();
                String result= convertStreamToString(instream);

And also don’t forget to add permission for internet in Android manifest file.

<uses-permission android:name="android.permission.INTERNET" />

BBB_Thinkspeak APKHere is a snapshot of Main Activity.