Reputation: 1
With reference to this link open a url on click of ok button in android
i want to call php function in my xampp server by the builder button click "ok"
Upvotes: 0
Views: 1051
Reputation: 333
Uri uri = Uri.parse("10.0.2.2/sth.php?runFunction=true");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
PHP:
<?php
if($_GET["runFunction"] == true){
myFunction();
}
function myFunction(){
...
}
?>
Upvotes: 1