JAVA/Android

어플 종료

네코냥이 2015. 4. 1. 15:37


How to exit an android app using code?




You can call System.exit(); to get out of all the acivities.

    submit=(Button)findViewById(R.id.submit);

            submit.setOnClickListener(new OnClickListener() {

                @Override
                public void onClick(View arg0) {
android.os.Process.killProcess(android.os.Process.myPid());
                    System.exit(1);

                }
            });
shareimprove this answer








저작자표시 (새창열림)