Good Day,
I am very new at this type of methodology and before I pursue something that is actually not possible, I'd like to ask if one could run the following code in a non-ui B4J program to retrieve the co-ordinates of the current location of the laptop that it is running on and save them to a database (The database part is no problem).
Code is from w3schools.com (Link)
Actually all I need is to run the <script> </script> section and pass that back to 2x variables so that I can save it in a database.
If this can be done Then
Great
Please Help
Else
Back to the drawing board
Pass Ideas please
End
Have a Lekka Day !!
I am very new at this type of methodology and before I pursue something that is actually not possible, I'd like to ask if one could run the following code in a non-ui B4J program to retrieve the co-ordinates of the current location of the laptop that it is running on and save them to a database (The database part is no problem).
Code is from w3schools.com (Link)
B4X:
<!DOCTYPE html>
<html>
<body>
<p>Click the button to get your coordinates.</p>
<button onclick="getLocation()">Try It</button>
<p id="demo"></p>
<script>
var x = document.getElementById("demo");
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
function showPosition(position) {
x.innerHTML = "Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
}
</script>
</body>
</html>
Actually all I need is to run the <script> </script> section and pass that back to 2x variables so that I can save it in a database.
If this can be done Then
Great
Please Help
Else
Back to the drawing board
Pass Ideas please
End
Have a Lekka Day !!