mornaner
mornaner

Reputation: 2424

phonegap android returning to native app from remote server

I have a phonegap app on android that runs in a remote server. On the main page I do:

window.location.href=startUrl+"./main.html"+params;

This loads the main.html page that runs on a server.

From there I'm trying to return to the index page (the native one), but I don't know how to do this. I'm trying this:

window.location.href= 'file:///android_asset/www/index.html';

But does not work.

Any ideas of how can I do this?

Upvotes: 0

Views: 572

Answers (1)

codemonkey
codemonkey

Reputation: 5267

navigator.app.loadUrl('file:///android_asset/www/index.html');

Upvotes: 2

Related Questions