finish Program - Android Android OS

Android examples for Android OS:Process

Description

finish Program

Demo Code


//package com.java2s;
import java.util.ArrayList;
import java.util.List;
import android.app.Activity;

public class Main {
    private static List<Activity> activityList = new ArrayList<Activity>();

    public static void finishProgram() {

        for (Activity activity : activityList) {
            activity.finish();//w  w w. j  ava  2s .com
        }

        android.os.Process.killProcess(android.os.Process.myPid());

    }
}

Related Tutorials