我想在卸载应用程序时在android应用程序上调用logout方法。
private void setlogout() {
StringRequest stringRequest = new StringRequest(Request.Method.GET, logout,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
// Toast.makeText(getApplicationContext(), "logout successfully", Toast.LENGTH_SHORT).show();
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
// Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_SHORT).show();
}
});
//adding our stringrequest to queue
Volley.newRequestQueue(this).add(stringRequest);
}