开发者

How to call android application from web browser

I want to call android application on开发者_运维问答 clicking of button on some website from mobile. Suppose I am opening one url on android browser and I want to call my application on clicking on button provided by that site. How to do that??

Suppose we are using browser other than Chrome then is it allowing??


If you link to your application as "myapp://foo/bar", can't you use some sort of intent filter to start your application.

I mean, if you press a youtube link in the browser it asks if you want to complete the action with the YouTube app or the browser.

I have seen similar examples regarding Google Maps links (which would open in either browser, google maps(?) or GeoBeagle).


Please take a look at the WebViewDemo. Javascript code in the web page can call into your Activity. As well as the other way around.


You cannot... if the site is being browsed in the default browser (Chrome).

If you already have an application that embeds the WebView, then you can do some bit of handling of - mouse clicks, window alerts, navigation etc. Otherwise, not!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜