I implemented android webview and onKeyDown method for back key. (It implements webview.goBack();
)
My problem is exactly similar to the question in this post below (no answers there)
How to control the Android WebView history/back stack?
PROBLEM - When I press back button, webview
selects the previous URL, but if that URL was actually a redirect, it goes into this vicious cycle/loop. If you look at chrome or stock browser it correctly handles the back without going back to the redirects.
How can this be solved?
Example: go to gap.com. Then select "My Gap Credit Card". This opens a redirect link and then the final page. Now when I click back, it never goes to Gap.com home page.
Any suggestions...
Additional Information: I did implement the shouldOverrideUrlLoading
. If I remove that method, it seems to work fine but with this method it does not...
BrowserActivity.java
orController.java
. – Anirudh Ramanathan May 28 '13 at 6:14