I implemented content observer of history but it is behaving weird.For every change in history its onChange() function runs 3-5 times.
static class BrowserOberse
I think I may find the answer. First I want to say that my English is limited, I hope that you can understand me.
Indeed, onChange();
runs several times for each change in history, at least two times.
Because when user use the browser to browse a website, the system add a history in database, and onChange();
is called. But right now the system don't know the title of the url. After the system got the title of the url, the system updates the database and onChange();
is called second time.
And, if the url is redirecting during the time, every time the system gets a new url, the system will update the database too, so onChange(); is called too. So, I think onChange will be called several times every change. Hope you can understand my English.