Android注销功能

// 注销 清空TaskStack
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
    @Override
    public void run() {
        // TODO Auto-generated method stub
        Intent logoutIntent = new Intent(getActivity(), LoginActivity.class);
        startActivity(logoutIntent);
    }
}));
System.exit(0);//

你可能感兴趣的:(Android开发)