I am using JavaScript to redirect to another page in my app, on a web page:
This is the javascript code:
$ (document) .ready (function () {setTimeout (function () {window.location.replace ('.com.my.app .services.MyClass');}, 3000);});
However, if I click on the back button of my device, for example, when the login has accumulated, an external browser has to be opened during JS loading. An HTML page, has been linked with the wicket, and I have this problem with Android.
I am very new to all of this.
I tried, to avoid the opening of the browser, it is:
variously visible; Function ShowIf (urlOfThePage) {// Add it to the wicket and when the user submits on login, (Visible === "visible") {window.location.replace (urlOfThePage); } Else {}} (function () {var hidden = "hidden"; // standard: if document (hidden in document); document.addEventListener ("visibilitychange", onchange); else if ((hidden = "mozHidden") Document) in the document. AddEventListener ("noticeable"), and if (hidden in the document = "webkithead")) document. AddEventListener ("WebKitVisibility", on change); Otherwise (in the hidden ("hidden" = "MSHed") document) .addEventListener ("msvisibilitychange", onchange); // IE 9 and Bottom: And if ("onfocusin" in the document) document.onfocusin = document.onfocusout = onchange; // Other All: Other Window :. Example = window.onpagehide = window.forex = window.onblue = onchen; Function Onantase (EVT) {var v = "visible", h = "hidden", eventmap = {focus: V, focus: v, page: V, blur: h, focusout: h, pagehide: h}; Evt = evt || Window.event; If (evtMap in evt.type) visibile = evtMap [evt.type]; Else visible = this [hidden]? "Hidden": "visible"; } // Set the initial position (but if the browser supports the page visibility API) if (document [hidden]! == undefined) but ({type: document [hidden]? "Mist": "focus"} ); }) ();
// login.java, at the wk:
[...] Private Zero sign in (AjaxRequestTarget target, class
If the user taps on the back button, the page should be "hidden" and move, to avoid Android, to open the browser
Thank you.
"text">
Add this line to your webview.
webView.setWebViewClient (new WebViewClient ());
Comments
Post a Comment