I am using android studio and trying to make a mobile app using JavaScript.
I have already loaded index.html
using webview.
Now I want go to ShoppingList.html
which is saved in assets
using the following JavaScript code.
When I use the emulator with android version 6 it works perfectly. But with android version 7 my application terminates when the Navigate()
function is called.
I also tried window.location
and document.location.href
but nothing works.
The JavaScript code I'm using to navigate to another html file is:
function Navigate()
{
document.location = "file:///android_asset/www/ShoppingList.html";
}