Our Android app has a WebView which shows a page from our web-server. The page does a user registration (either via Facebook or by choosing a username and password). After that, I want the page to pass information back to the native app (e.g., username, license type, messges, etc.).
I know of JavaScript<->Java binding (addJavaScriptInterface), but was wondering is there a different way do to it:
After the user logs in, you can capture data from the URL using WebView::getUrl(). Alternately, you could use cookies.
http://pragungoyal.com/tutorials/extracting-cookies-from-a-webview-in-android/
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