-
public final class ProcessPhoenixProcess Phoenix facilitates restarting your application process. This should only be used for things like fundamental state changes in your debug builds (e.g., changing from staging to production).
Trigger process recreation by calling triggerRebirth with a Context instance.
-
-
Method Summary
Modifier and Type Method Description static voidtriggerRebirth(Context context)Call to restart the application process using the default activity as an intent. static voidtriggerRebirth(Context context, Class<out Activity> targetClass)Call to restart the application process using the provided Activity Class. static voidtriggerRebirth(Context context, Array<Intent> nextIntents)Call to restart the application process using the specified intents. static voidtriggerServiceRebirth(Context context, Class<out Service> targetClass)Call to restart the application process using the provided Service Class. static voidtriggerServiceRebirth(Context context, Intent nextIntent)Call to restart the application process using the specified Service intent. static booleanisPhoenixProcess(Context context)Checks if the current process is a temporary Phoenix Process.This can be used to avoid initialisation of unused resources or to prevent running code thatis not multi-process ready. -
-
Method Detail
-
triggerRebirth
static void triggerRebirth(Context context)
Call to restart the application process using the default activity as an intent.
Behavior of the current process after invoking this method is undefined.
-
triggerRebirth
static void triggerRebirth(Context context, Class<out Activity> targetClass)
Call to restart the application process using the provided Activity Class.
Behavior of the current process after invoking this method is undefined.
-
triggerRebirth
static void triggerRebirth(Context context, Array<Intent> nextIntents)
Call to restart the application process using the specified intents.
Behavior of the current process after invoking this method is undefined.
-
triggerServiceRebirth
static void triggerServiceRebirth(Context context, Class<out Service> targetClass)
Call to restart the application process using the provided Service Class.
Behavior of the current process after invoking this method is undefined.
-
triggerServiceRebirth
static void triggerServiceRebirth(Context context, Intent nextIntent)
Call to restart the application process using the specified Service intent.
Behavior of the current process after invoking this method is undefined.
-
isPhoenixProcess
static boolean isPhoenixProcess(Context context)
Checks if the current process is a temporary Phoenix Process.This can be used to avoid initialisation of unused resources or to prevent running code thatis not multi-process ready.
-
-
-
-