简体   繁体   中英

perform action when application is uninstall

How to invoke setlogout() when application is uninstalled?

    private void setlogout() {
        StringRequest stringRequest = new StringRequest(Request.Method.GET, URLs.logout+user.getapi_token(),
                new Response.Listener<String>() {
                    @Override
                    public void onResponse(String response) {
                    }
                },
                new Response.ErrorListener() {
                    @Override
                    public void onErrorResponse(VolleyError error) {

                    }
                });
        //adding our stringrequest to queue
        Volley.newRequestQueue(context).add(stringRequest);
    }

这是不可行的,因为卸载应用程序是由OS处理的。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM