How To Get Post Parameters From Android Webview's Url In Onpagestart() Method
I'm making an webview app for Android and iPhone. In Android I'm facing an Issue I have a webview with custom WebviewClient like this webView.setWebViewClient(new MyWebViewClient()
Solution 1:
It's not possible to do this (look at POST data) using the Android WebView since it doesn't allow you to look at the data being sent to the server. You could re-write the page with JavaScript fish out the values of the input fields (or change the method to GET) but handling images with either method will probably not be trivial.
Since you write 'POST parameters embedded with the url' I wonder if the form is using method='get', in which case take a look at this answer: Parsing query strings on Android
Also, don't call stopLoading
from onPageStarted
, that's going to end in a race. Use shouldOverrideUrlLoading
for that (just return true from there instead of calling stopLoading
).
Post a Comment for "How To Get Post Parameters From Android Webview's Url In Onpagestart() Method"