Tell me more ×  I want to log the history url or last loaded url
without manually storing the history urls. Is that possible?
share|improve this question add comment  2 Answers  up vote 12
down vote accepted  Found the answer in the docs ...
WebBackForwardList mWebBackForwardList =
mWebView.copyBackForwardList(); String historyUrl = mWebBackForw
ardList.getItemAtIndex(mWebBackForwardList.getCurrentIndex()-
1).getUrl(); share|improve this answer It works but there is a
mistake. If you are on PageA then you go to PageB. Now when you
press back button it takes you correctly back to pageA. But now
if you press back button again, it will take you to PageB again
because pageB was the previous page. So, it will loop between
the two pages forever. –  Adil Malik Jul 29 at 1:31 In any case
I wasn't using the history to navigate to pages, so it wouldnt
be an issue in my case. I just needed it for logging purposes.
Are you using the backForwardList to navigate? If so, why?
Android browser would take care of that by defau