Почему общие настройки сбрасываются при сбое приложения или принудительном закрытии Android

Я взял код CSIPSIMPLE и переупаковал в com.mycompany.appname

Проблема в том, что при сбое приложения все значения удаляются из общих настроек.

Зачем?

Моя заявка

public class BeemApplication extends Application {

    static BeemApplication application = null;

    public static SharedPreferences mPref;
    public static Editor mEditor;

    public BeemApplication() {

    }

    public static BeemApplication getInstance() {
        if(application != null) {
            return application;
        } else {
            return new BeemApplication();
        }
    }

    @Override
    public void onCreate() {
        super.onCreate();
        application = this;
        mPref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
        mEditor = mPref.edit();
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
    }

}

В Activity я получу их как,

BeemApplication.mEditor.putString(ctx.getString(R.string.pref_online_number), number).commit();

BeemApplication.mPref.getString(ctx.getString(R.string.pref_online_number), number).commit();

Ответы на вопрос(1)

Ваш ответ на вопрос