问题
does somebody know a explicit way to programmatically login to a website in an Android-App?
Thanks in advance :)
回答1:
Don't cmpletely understand what you want, but if you just need to login and see the response, you could use a webview, and parse through the html like how to get html content from a webview?.
回答2:
this is an answer:
web.loadUrl("javascript: {" +
"document.getElementsByName('authid')[0].value = '" + ID + "';" +
"document.getElementsByName('authpw')[0].value = '" + PASS + "';" +
"var submit = document.getElementsByClassName('inputbutton');" +
"submit[0].click(); };");
来源:https://stackoverflow.com/questions/41474239/android-java-programmatically-login-into-website-with-android-app