Back to project page android-utils.
The source code is released under:
Apache License
If you think the Android project android-utils listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.worthed.app; /* w w w . ja v a 2 s .c o m*/ import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.app.Application; /** * ????????Application * ????????????????????????????????????????????????????????????????, ??????? * * @author jingle1267@163.com */ public class BaseApplication extends Application { /** * activity???? */ public List<Activity> activityStack = null; @Override public void onCreate() { super.onCreate(); // activity???? activityStack = new ArrayList<Activity>(); // ?????? BaseCrashHandler handler = BaseCrashHandler.getInstance(); handler.init(this); // ???????1s??????????? new RebootThreadExceptionHandler(getBaseContext()); } @Override public void onTerminate() { super.onTerminate(); } // ?????,????????????????? @Override public void onLowMemory() { super.onLowMemory(); } // /?????? public void exitApp() { for (Activity activity : activityStack) { if (activity != null) { activity.finish(); } } } }