本文整理汇总了Java中com.zxy.recovery.core.Recovery类的典型用法代码示例。如果您正苦于以下问题:Java Recovery类的具体用法?Java Recovery怎么用?Java Recovery使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Recovery类属于com.zxy.recovery.core包,在下文中一共展示了Recovery类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.zxy.recovery.core.Recovery; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
app=this;
getScreen(this);
Fresco.initialize(this);
Recovery.getInstance()
.debug(true)
.recoverInBackground(false)
.recoverStack(true)
.mainPage(MainActivity.class)
.init(this);
String[] urls = getResources().getStringArray(R.array.url);
String[] tips = getResources().getStringArray(R.array.title);
List list = Arrays.asList(urls);
images = new ArrayList(list);
List list1 = Arrays.asList(tips);
titles= new ArrayList(list1);
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:20,代码来源:App.java
示例2: initBanner
import com.zxy.recovery.core.Recovery; //导入依赖的package包/类
private void initBanner() {
H = getScreenH(this);
Recovery.getInstance()
.debug(true)
.recoverInBackground(false)
.recoverStack(true)
.mainPage(MainActivity.class)
.init(this);
String[] urls = getResources().getStringArray(R.array.url4);
String[] tips = getResources().getStringArray(R.array.title);
List list = Arrays.asList(urls);
images = new ArrayList<>(list);
Log.d("Photo","images.size:" + images.size());
titles= Arrays.asList(tips);
}
开发者ID:AndroidBoySC,项目名称:Mybilibili,代码行数:17,代码来源:APP.java
示例3: onCreate
import com.zxy.recovery.core.Recovery; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Log.e("zxy", "Recovery: init");
Recovery.getInstance()
.debug(true)
.recoverInBackground(false)
.recoverStack(true)
.mainPage(MainActivity.class)
.recoverEnabled(true)
.callback(new MyCrashCallback())
.silent(false, Recovery.SilentMode.RECOVER_ACTIVITY_STACK)
.skip(TestActivity.class)
.init(this);
MyCrashHandler.register();
}
开发者ID:Sunzxyong,项目名称:Recovery,代码行数:20,代码来源:App.java
示例4: onActivityStarted
import com.zxy.recovery.core.Recovery; //导入依赖的package包/类
@Override
public void onActivityStarted(final Activity activity) {
boolean isLegal = RecoveryStore.getInstance().verifyActivity(activity);
if (!isLegal)
return;
if (activity.getIntent().getBooleanExtra(RecoveryActivity.RECOVERY_MODE_ACTIVE, false)) {
Reflect.on(Recovery.class).method("registerRecoveryProxy").invoke(Recovery.getInstance());
}
if (RecoveryStore.getInstance().contains(activity))
return;
Window window = activity.getWindow();
if (window != null) {
View decorView = window.getDecorView();
if (decorView == null)
return;
decorView.post(new Runnable() {
@Override
public void run() {
RecoveryStore.getInstance().putActivity(activity);
Object o = activity.getIntent().clone();
RecoveryStore.getInstance().setIntent((Intent) o);
}
});
}
}
开发者ID:Sunzxyong,项目名称:Recovery,代码行数:30,代码来源:RecoveryActivityLifecycleCallback.java
示例5: saveCrashData
import com.zxy.recovery.core.Recovery; //导入依赖的package包/类
private static void saveCrashData(CrashData data) {
if (data == null)
return;
SharedPreferencesCompat.newBuilder(Recovery.getInstance().getContext(), SHARED_PREFS_NAME)
.put(CRASH_COUNT, String.valueOf(data.crashCount))
.put(CRASH_TIME, String.valueOf(data.crashTime))
.put(SHOULD_RESTART_APP, String.valueOf(data.shouldRestart))
.apply();
}
开发者ID:Sunzxyong,项目名称:Recovery,代码行数:10,代码来源:RecoverySharedPrefsUtil.java
示例6: getExternalDataDir
import com.zxy.recovery.core.Recovery; //导入依赖的package包/类
private static File getExternalDataDir() {
File file = null;
if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
file = Recovery.getInstance().getContext().getExternalCacheDir();
}
return file == null ? null : file.getParentFile();
}
开发者ID:Sunzxyong,项目名称:Recovery,代码行数:8,代码来源:RecoveryUtil.java
示例7: saveCrashData
import com.zxy.recovery.core.Recovery; //导入依赖的package包/类
private static void saveCrashData(CrashData data) {
if (data == null)
return;
SharedPreferencesCompat.newBuilder(Recovery.getInstance().getContext(), SHARED_PREFS_NAME)
.put(CRASH_COUNT, String.valueOf(data.crashCount))
.put(CRASH_TIME, String.valueOf(data.crashTime))
.put(SHOULD_CLEAR_APP_AND_NOT_RESTART, String.valueOf(data.shouldRestart))
.apply();
}
开发者ID:Sunzxyong,项目名称:Recovery,代码行数:10,代码来源:RecoverySilentSharedPrefsUtil.java
示例8: e
import com.zxy.recovery.core.Recovery; //导入依赖的package包/类
public static void e(String message) {
if (Recovery.getInstance().isDebug())
Log.e(TAG, message);
}
开发者ID:Sunzxyong,项目名称:Recovery,代码行数:5,代码来源:RecoveryLog.java
示例9: clear
import com.zxy.recovery.core.Recovery; //导入依赖的package包/类
public static void clear() {
SharedPreferencesCompat.clear(Recovery.getInstance().getContext(), SHARED_PREFS_NAME);
}
开发者ID:Sunzxyong,项目名称:Recovery,代码行数:4,代码来源:RecoverySharedPrefsUtil.java
示例10: put
import com.zxy.recovery.core.Recovery; //导入依赖的package包/类
private static void put(String key, String value) {
SharedPreferencesCompat.put(Recovery.getInstance().getContext(), SHARED_PREFS_NAME, key, value);
}
开发者ID:Sunzxyong,项目名称:Recovery,代码行数:4,代码来源:RecoverySharedPrefsUtil.java
示例11: get
import com.zxy.recovery.core.Recovery; //导入依赖的package包/类
private static String get(String key, String defValue) {
return SharedPreferencesCompat.get(Recovery.getInstance().getContext(), SHARED_PREFS_NAME, key, defValue);
}
开发者ID:Sunzxyong,项目名称:Recovery,代码行数:4,代码来源:RecoverySharedPrefsUtil.java
示例12: getDataDir
import com.zxy.recovery.core.Recovery; //导入依赖的package包/类
private static File getDataDir() {
return new File(File.separator + "data" + File.separator + "data" + File.separator + Recovery.getInstance().getContext().getPackageName());
}
开发者ID:Sunzxyong,项目名称:Recovery,代码行数:4,代码来源:RecoveryUtil.java
注:本文中的com.zxy.recovery.core.Recovery类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论