Logout on activity destroy
This commit is contained in:
parent
8f2305303c
commit
b1531788db
@ -300,6 +300,14 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Network.requestPost(Network.LOGOUT_URI, new HashMap<String, String>());
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@ import java.util.Set;
|
|||||||
|
|
||||||
public class Network {
|
public class Network {
|
||||||
public static final String LOGIN_URI = "http://study.ck.tp.edu.tw/login_chk.asp";
|
public static final String LOGIN_URI = "http://study.ck.tp.edu.tw/login_chk.asp";
|
||||||
|
public static final String LOGOUT_URI = "http://study.ck.tp.edu.tw/logout.asp";
|
||||||
|
|
||||||
public static String uploadFile(String sourceFileUri, InputStream in, String uploadFileName) {
|
public static String uploadFile(String sourceFileUri, InputStream in, String uploadFileName) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user