Skip to content

Commit

Permalink
Should be working now :)
Browse files Browse the repository at this point in the history
  • Loading branch information
thermatk committed Oct 15, 2013
1 parent 8e6b278 commit 03c5289
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
<string name="action_settings">И меню нет</string>
<string name="hello_world">Пока нечего настраивать :)</string>
<string name="connectedto">Подключён к </string>
<string name="authsent">Запрос на аутентификацию отправлен</string>

</resources>
13 changes: 11 additions & 2 deletions src/com/thermatk/android/l/hsewifi/HSEConnect.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,22 @@ public IBinder onBind(Intent intent) {

private void sendInfo() {
AsyncHttpClient client = new AsyncHttpClient();
client.get("http://ipecho.net/plain", new AsyncHttpResponseHandler() {
RequestParams params = new RequestParams();
params.put("buttonClicked", "4");
params.put("err_flag", "0");
params.put("err_msg", "");
params.put("info_flag", "0");
params.put("info_msg", "");
params.put("redirect_url", "");
params.put("username", "hseguest");
params.put("password", "hsepassword");
client.post("https://wlc22.hse.ru/login.html", params, new AsyncHttpResponseHandler() {
@Override
public void onSuccess(final String response) {
handler.post(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicationContext(), response,
Toast.makeText(getApplicationContext(), getApplicationContext().getString(R.string.authsent),
Toast.LENGTH_SHORT).show();
}
});
Expand Down

0 comments on commit 03c5289

Please sign in to comment.