我正在尝试以编程方式登录https://thingspeak.com/login网站。我已经编写了 Blow android 程序,但它不能帮助我登录。请告诉我我做错了什么。
//inside thread function
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("User ID", "****"));
nameValuePairs.add(new BasicNameValuePair("Password", "*****"));
nameValuePairs.add(new BasicNameValuePair("Sign In", "Sign In"));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
//after thread function getting called, below line is from oncreate method
WebView webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setAppCacheEnabled(false);
webview.getSettings().setJavaScriptEnabled(true);
WebSettings webSettings = webview.getSettings();
webSettings.setJavaScriptEnabled(true);
webview.loadUrl("https://thingspeak.com/channels/42085");
我可以加载网站,但它告诉这个频道不公开,因为它没有登录。请帮助我。提前致谢。
用户名:niru
密码:helloworld@123