Hi
If you have a native app which has a webview in it where you put the anchor tag. Here a simple app you to try which has a back key to navigate to previous page.
// ------------------ mainApp.js file ------------
function OnStart() {
// disbable back key default behaviour
app.EnableBackKey(false);
lay = app.CreateLayout( "linear", "VCenter,FillXY" )
// your webview
web = app.AddWebView(lay, 0.9, 0.8);
web.LoadUrl("myHtml.html");
app.AddLayout( lay )
}
// handle back key
function OnBack() {
// check if webview has history
if( web.CanGoBack() ) web.Back();
}
And you have put your link in your myHtml.html file anchor tag like this
<html>
<head>
<script src='file:///android_asset/app.js'></script>
<title>My Html App</title>
<script>
function OnStart() {
// your code here
}
</script>
</head>
<body onload="app.Start()">
<p>Try navigating to this site</p>
<a href="
https://www.apk4sale.com">Go to this site</a>
</body>
</html>
Regards
Jumar