I have PHP link that updates totals on my database for my website. This website has no UI at all. When the user clicks on my button I just want it to load the link in the background and not view it. Using,
public void cButton(View view){
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(browserIntent);
}
will prompt Android to open up its native browser, I just want to load the link. Any methods you guys have in mind :) ?
I suppose you simply want to do an HTTP request? In this case you don't really want to start activity for loading the page in a browser. For such purpose Google is providing quite simple to use library. Hope this will help you: https://developer.android.com/training/volley/simple.html