I am having a problem with a WebView
app that I am working on.
We have this responsive website that is being displayed through an android WebView
.
The website has a Sign in with Facebook option, this works fine in a mobile browser and on the website itself. Whenever I try to use the WebView
app to login using Facebook
, it results in a white screen.
I am having difficulties finding a solution to get this to work.
Appreciate any advise.
Our in-app browser for Facebook on Android has historically relied on an Android System WebView based on Chromium, the open source project that powers many browsers on Android and other operating systems.
You may have come across an app called Android System WebView on your smartphone. It's a piece of software that enables other apps on your Android device to display web content without having to open a dedicated web browser.
I was able to find a solution based on a previous question on stackoverflow.com
Making facebook login work with an Android Webview
Here is a link to my MainActivity : http://pastebin.com/KdzfhqDJ
I'm fairly certain it's this same issue. Essentially it opens in another window and WebView
doesn't support multiple windows out-of-the-box.
Luckily for you, unlike that question which was iOS-specific, if I recall correctly, it's possible to extend WebView
to support multiple windows. You'll need to extend WebChromeClient
, implement onCreateWindow
and use it in your WebView
.
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