android - Back button is not working properly? -
i have developed application in phonegap android.
in app button not working properly.
i used code navigate form:
document.addeventlistener("backbutton", handlebackbutton, true); function handlebackbutton() { if (typeof(navigator) != 'undefined' && typeof(navigator.app) != 'undefined' && typeof(navigator.app.backhistory) == 'function') { history.go(-1); navigator.app.backhistory(); } else { history.go(-1); //navigator.app.backhistory(); } } its working following:
for example have 3 page a.html, b.html, c.html
i'm navigating a.html b.html c.html
issues
when click button, navigate c.html b.html,
again process repeat, wont go a.html.
by explanation come conclusion that,when navigating form c.html b.html,now screen(histroy(-1)) c.html b.html , repeat continuously.my point make b.html previous screen , a.html previous of previous screen.
Comments
Post a Comment