@@ -0,0 +1,1122 @@
+/**   %0A * @Title: BaseApp.java %0A * @Package me.pc.mobile.helper.v14 %0A * @Description: TODO%0A * @author SilentKnight %7C%7C happychinapc%5Bat%5Dgmail%5Bdot%5Dcom   %0A * @date 2014 2014%E5%B9%B412%E6%9C%8818%E6%97%A5 %E4%B8%8B%E5%8D%884:51:30 %0A * @version V1.0.0   %0A */%0Apackage me.pc.mobile.helper.v14.base;%0A%0Aimport java.util.Stack;%0A%0Aimport android.app.Activity;%0Aimport android.app.Application;%0A%0A/**%0A * @ClassName: BaseApp%0A * @Description: TODO%0A * @author SilentKnight %7C%7C happychinapc@gmail.com%0A * @date 2014%E5%B9%B412%E6%9C%8818%E6%97%A5 %E4%B8%8B%E5%8D%884:51:30%0A * %0A */%0Apublic class BaseApp extends Application %7B%0A%0A%09private static Stack%3CActivity%3E activities = new Stack%3CActivity%3E();%0A%0A%09/*%0A%09 * (non-Javadoc)%0A%09 * %0A%09 * @see android.app.Application#onTerminate()%0A%09 */%0A%09@Override%0A%09public void onTerminate() %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09super.onTerminate();%0A%09%09exitAppCompletely();%0A%09%7D%0A%0A%09public static void push(Activity activity) %7B%0A%09%09activities.push(activity);%0A%09%7D%0A%0A%09public static void pop() %7B%0A%09%09Activity activity = activities.pop();%0A%09%09if (activity != null && !activity.isFinishing()) %7B%0A%09%09%09activity.finish();%0A%09%09%7D%0A%09%7D%0A%0A%09public static void exitAppCompletely() %7B%0A%09%09while (!activities.isEmpty()) %7B%0A%09%09%09pop();%0A%09%09%7D%0A%09%7D%0A%7D%0A

Create BaseApp.java