Android BackStack

52 views
Skip to first unread message

IHorowitz

unread,
May 17, 2012, 2:55:49 PM5/17/12
to phonegap
I have a phonegap app with the index.html installed in the app. There
a link to a server hosted cgi. This cgi is behind authentication.

A webserver plugin forces the user to an authentication page, if not
already cookied. With valid credentials, the user is redirected to
the initial target. That intermediate authentication page ends up on
the Android Stack. I've tried using this from the backbutton snippet
on the server hosted destination page. But that doesn't work.

function init() {
document.addEventListener("deviceready", onDR, false);
}
function onDR(){
document.addEventListener("backbutton", backKeyDown, true);
//boot your app...
}
function backKeyDown() {
// do something here if you wish
alert('go back!');
}

Is there a way I can put the authentication URI in the manifest.xml so
it's automatically not put on the stack.
Any suggestions?

Thanks,
I. Horowitz

Bryce Curtis

unread,
May 18, 2012, 2:29:39 PM5/18/12
to phon...@googlegroups.com
Try navigator.app.clearHistory().
> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com
Reply all
Reply to author
Forward
0 new messages