android - How can I get URL or search query from browsers intent or activity? -


good day

here's issue: let's assume, user enters url or search query in browser or clicks on url in text editor. after suppose intent action_web_search flag created , performed. how can parse such intent , extract required query or url it?

i've seen lot of decisions, of them work fine if user shares data. it's not suitable me.

after suppose intent action_web_search flag created , performed.

no.

when user "clicks on url in text editor", typical behavior hosting app use startactivity() action_view intent, supplying url.

when user "enters url or search query in browser", browser whatever browser wants. few, if any, browsers use action_web_search this, because action_web_search designed bring web browser search, , web browser already is web browser.

it conceivable there apps call startactivity() action_web_search intent. however, since first have heard of action in number of years, suspect not popular.

how can parse such intent , extract required query or url it?

you welcome implement own activity supports action_web_search via <intent-filter> in manifest. retrieve search terms via getstringextra(searchmanager.query), noted in the documentation.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -