Bootstrap

Android 一键退出app

1、使用eventbus实现一键退出APP

public abstract class BaseActivity extends Activity {
   
    @Override
    protected void onCreate(Bundle savedInstanceState) {
   
        super.onCreate(savedInstanceState);
        if (getNeedEventBus()) {
   
            EventBus.getDefault().register(this);
        }
    }

    @Override
    protected void onDestroy() {
   
        super.onDestroy()<
;