Support regarding Android WebView SSL trust -


i need regarding ssl trust. loading payment gateway page in webview. post request , passing payload. happening till now.(shown below)

mwebview = (android.webkit.webview)control;  string payload = "mypayload";  byte[] valtest = encoding.utf8.getbytes(payload.tochararray(0, payload.length));  mwebview.settings.javascriptenabled = true; mwebview.settings.domstorageenabled=true;  mwebview.setwebviewclient(new mywebviewclient(this)); mwebview.setwebchromeclient(new chromeclient()); mwebview.posturl("https://mypage", valtest); 

after filling form , submit getting callback in onreceivedsslerror method of webviewclient class. here ask proceed (as per various forums). once done not getting success callback. need able read javascript values once response webview. not know how achieved. shown below onsslerrorreceived callback method.

public override void onreceivedsslerror(android.webkit.webview view, sslerrorhandler handler, android.net.http.sslerror error)         {                 base.onreceivedsslerror(view, handler, error);                 handler.proceed();                            }         } 

expectations- 1. on submitting form should trusted(it self-signed certificate). 2. once above step done expecting response webpage. need read javascript values page. how can achieve this? not see successcallback or responsecallback.

i use below read js values.but not working.

 view.evaluatejavascript("document.getelementbyid('test').value", new mycallbackclass()); 

the above issue has been resolved. calling handler.proceed in onsslerror method fine issue calling base inside callback. once removed base.onsslerror code worked fine.

after page finishes able read js values in onpagefinished callback method. evaluate js function working , callbacks.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -