I'm trying to make a simple LED burning application for my IoT project, but I haven't been able to do it for months. What I want to do is press a button on my android application and I want it to go to http://92.168.4.1/?State=i
in the background.Please help me :(
on.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
String webID = "http://192.168.4.1/?State=i";
Intent bIntent = new Intent();
bIntent.setAction(Intent.ACTION_VIEW);
bIntent.addCategory(Intent.CATEGORY_BROWSABLE);
bIntent.setData(Uri.parse(webID));
startActivity(bIntent);
}
});