I'm trying to solve a problem in integrating WebChromeClient
and try to achieve this one below (If possible).
Mine:
Steps that I made: I create an Activity
with WebView
in it. And just reflect the Url
in the toolbar as title.
How can we somehow fuse (Fuse maybe not the right word) this to our App? The onCreateOptionsMenu
is from Chrome Browser as I noticed.
EDIT: I don't know the name of it, I thought it is webChromeClient
.
I don't know the exact name for this, I thought it was webChromeClient
- but it is Chrome Custom Tabs
. The documentation for implementations is found here:
https://developer.chrome.com/multidevice/android/customtabs#whatarethey
Gradle: compile 'com.android.support:customtabs:24.2.1'
Chrome Custom Tabs is faster than Google Chrome Browser and WebView.
The WebView is good solution if you are hosting your own content inside your app. If your app directs people to URLs outside your domain, It is recommend that you use Chrome Custom Tabs for these reasons:
NOTE:
If there is no default browser set, it will pop up BottomSheet
to complete action using
. I think this should not be. We must check if Chrome
browser is installed and launched that instead of other browser.