Package 

Class ProcessPhoenix


  • 
    public final class ProcessPhoenix
    
                        

    Process 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 void triggerRebirth(Context context) Call to restart the application process using the default activity as an intent.
      static void triggerRebirth(Context context, Class<out Activity> targetClass) Call to restart the application process using the provided Activity Class.
      static void triggerRebirth(Context context, Array<Intent> nextIntents) Call to restart the application process using the specified intents.
      static void triggerServiceRebirth(Context context, Class<out Service> targetClass) Call to restart the application process using the provided Service Class.
      static void triggerServiceRebirth(Context context, Intent nextIntent) Call to restart the application process using the specified Service intent.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.