Android / Java: Programmatically login into website with Android-App

假装没事ソ 提交于 2021-02-08 12:01:03

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!