I just made an Android app where I am displaying my website in a webview.
My webpage has many links to Google Hangouts URL (https://talkgadget.google.com/hangouts/_/g23uuqx.......) in which there are people in a call.
When this link is clicked on a Desktop's browser, the URL gets opened in a new tab and the user is able to join the Google Hangout call.
When this link is clicked on a Mobile's browser, the hangout app get's opened and the user is able to join the call. How can have the same effect when the link is clicked in WebView?
When I open the hangout URL in mobile app(webview), it opens the google play webpage in my app(webview) and asks me to install hangout which I already have installed.
Instead of going to google play store within the webview of my app,
(When Google Hangouts app is installed on the Android phone)
1) How do I open the hangout app from my app which has hangout URLs of this form(https://talkgadget.google.com/hangouts/_/g23uuqx.......) in the webview of my app?
(When Google Hangouts app is not installed on the Android phone)
2) How to open Google playstore app and inform the user to Install Google Hangout app in order to join the call?
Kindly help. Thanks.
You can use WebViewClient.shouldOverrideUrlLoading
to catch these links and then start an appropriate activity. A good example of how to launch the Google Play app this way is described here: Allow all 'market://' links from inside a webview to open Google Play store
This is more a browser-wars thing than anything else. Below is my solution from a user perspective.
I saw a monkey-path fix on Google's Product Forums which advises us to manually type in the Hangouts link into Google Search. This works. This would open Hangouts, ask for authentication with the account you wish to use (assuming you have multiple Google accounts on your phone), and lead you straight to the call on Hangouts. This, however, is cumbersome.
Then I thought about browser wars and decided to re-enable Chrome on my device. E voilá! Now, clicking on any Hangouts link from any app (in my case "Calendar") and choosing to open that link with Chrome takes you straight to the Hangouts call in the Hangouts.app
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With