I have a simple web page running on a raspberry pi toggle the board's LED with the click of a button. The button executes a javascript which toggles the LED...I essentially want to call this script from an android application's button...
Here is my html:
<html>
<head>
<script language="javascript">
function buttonClicked(){
$.ajax({
type: "GET",
url: "phpFiles/toggle.php",
success : function(){}
});
}
</script>
</head>
<body> just a button calling script </body>
I'm essentially pretty new to this..so I don't know if this is necessarily the best way to go about doing this...
I've tried methods such as this (calling javascript function from an android activity), but I haven't had much luck....