I have a device(ESP8266) which i have programmed in order to turn on/off my lights. It works like this: i open my browser and go on http://192.168.100.3/on and it turns on. To turn it off, i type http://192.168.100.3/off . I now want to make an android application that will do that for me when I click a button. I am being able to do it using this code:
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse("http://192.168.100.3/on"));
startActivity(i);
However, this technique is opening the browser. I do not want that. I want it to run the url without opening the browser.
Thank you for your time,
Maths_nerd