Check if Webpage/Webview contains certain words (android) -
i creating application, , give notification user if webpage (which displays canceled classes) contains class you're in.
how can done?
have use webview
, reload every x minutes on background , check if contains words, , if does, give notification? , if way, how check words within webview
?
this doable in webview, no unnecessary code needed. following code find string (you can set findlistener inform if/when string found, haven't used it's there):
string string = "text want find"; webview.findall(string); //works api levels 3 - 16 webview.findallasync(string); //works api levels 16 ,
as see, you'll have use both methods if want support api levels below 16. both have same listener though need 1 listener, check link above.
Comments
Post a Comment