Now in version 5 the extension is able to handle popups which are usually needed in OAuth login flow. Popups are especially important in OAuth login used in a lot of websites (e.g., www.feedly.com). The popups in this project open in a dialog and can be dismissed by a close button or pressing Back or if the popup window closes itself (like what happens on most login authentication flow).
Example Block diagram:
com.LukeGackle.aix (21.1 KB)
aia file of the example above:
test9.aia (21.7 KB)
apk file of the example:
test9.apk (2.3 MB)
You can test a lot of websites that uses popups strictly for OAuth login or for other things. Those would never work with a webview that has no popup handling capability.
Login using Google if needs a popup, the popup window will not get the changed useragent and hence will get error of disallowed agent. I will look into this if you need it. For some reason, it seems the popup webview sticking to the default user agent even though I applied the code to change the user agent string on the popup webview, just like what I applied to the original webview. The original webview works well with Google OAuth login that does not need popup.
Login with Facebook or Twitter or …etc. all work perfect with popup login Authentication flow. Or simply login using email if needs popup, this extension will do it for you.
It will show a dialog containing webviewer with the popup displayed, and when login successful will close it automatically and return back the user info received from the login server to the original webviewer.
Took me 2 days to develop the version 5 (version 1 to 4 is done by Luke Gackle), and 1-2 weeks to read about handling popups in webview using Android Studio.
The extension is open sourced and feel free to contribute if you like any additions or want to learn how to make extensions or popup handling.
Github repo of the extension:
Github repo of an Android Studio project showing an example app to handle popups:
For more details how to use the extension:
I love to see what can you do with this feature. Send here a message if you did something interesting with this extension.
Created by Luke Gackle
Version5 by Haider Alwasiti