I'm having a webpage that takes some information from the user, process it on the server side PHP and then gets the response back from the server.
Now I need to implement this (Including the web UI) into my Xamarin Forms app, so I thought about having a webview that loads the URL of the webpage, but now I can't figure out (Not even with googling) how to get the Javscript's resultant variable's value back to C#.
Here is a Javascript sample:-
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
let data = JSON.stringify(JSON.parse(this.responseText));
// Now I want to pass 'data' variable to C#
}
};
The app should wait till it receives this variable's value then executes other things, or until the user presses the back button to cancel the whole thing...
Any help is appreciated, thanks in advance. ^_^