Process Phoenix 可帮助您重新启动应用程序进程。
Process Phoenix ===================
Process Phoenix 可帮助您在新进程中重新启动应用程序进程。 它只应用于调试版本中的基本状态变化(例如,从临时环境切换到生产环境)。 使用方法 ------------
在新进程中启动默认活动: java ProcessPhoenix.triggerRebirth(context); 或者,如果您要使用特定的 Intent 启动: java Intent nextIntent = //... ProcessPhoenix.triggerRebirth(context, nextIntent); 要检查应用程序是否位于 Phoenix 进程中,以跳过 onCreate 中的初始化: ```java
if (ProcessPhoenix.isPhoenixProcess(this)) {
return;
}
```groovy
implementation 'com.jakewharton:process-phoenix:3.0.0'
``` 开发版的快照可在 [Sonatype 的 `snapshots` 仓库][snap] 中找到。 许可证 ------------
版权所有 (C) 2015 Jake Wharton
本文件受 Apache 许可证第 2.0 版 (以下简称"许可证") 限制;您不得在不遵守许可证的情况下使用本文件。您可以在以下网址获取许可证的副本:
[snap]: https://central.sonatype.com/repository/maven-snapshots/暂无开放 Issues,或尚未同步最近议题。