androidjs

App

App is an instance of app module, which provide various functions to interact with app

Methods

app.getPath(name)

Returns String - A path to a special directory or file associated with name. On failure returns -1

You can request the following paths by the name:

An example of above code:

let path = app.getPath('userData');
console.log(path);

app.loadURL(url)

Loads the url in the android webview, the url must contain the protocol prefix, e.g. the http:// or file://.

An example of above code:

app.loadURL('https://google.com');

app.reload()

Reloads the android webview.

An example of above code:

app.reload();