javascript - how to add custom history in HTML5 to prevent android back button to display just previous view in cordova application? -
i created application of http://coenraets.org/blog/cordova-phonegap-3-tutorial/ . when click on sms link in employee details view opens native message composer because link's href="sms:6170000010". when click on android button during message composer opened takes application previous view window.history.back(), want close message composer. how can customise source code close message composer when button pressed particular situation , rest of application should behave is.
below employee details view screenshot
i fixed using html5 history pushstate function.this allow me add history entry in history array. on android button click pop current(smscomposer) view history array , employee details view is.
<a href="sms:6170000010" onclick="modifybrowserhistory()" > function modifybrowserhistory(){ window.history.pushstate({page:"smscomposer"},"sms composer"); }
Comments
Post a Comment