Class ExcludedActivityHelper


  • public class ExcludedActivityHelper
    extends java.lang.Object
    Simple helper class to check if an activity should be excluded from the Batch's lifecycle and save the intent if there's a push payload attached.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean activityIsExcludedFromManifest​(android.app.Activity activity)
      Check if the activity has the EXCLUDE_FROM_LIFECYCLE meta-data info
      boolean hasIntent()
      Check if there's a pending ignored intent with a push payload
      android.content.Intent popIntent()
      Return the pending ignored intent with a push payload and remove it.
      void saveIntentIfNeeded​(android.app.Activity activity)
      Check if the activity has a Batch push payload and saving it.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExcludedActivityHelper

        public ExcludedActivityHelper()
    • Method Detail

      • saveIntentIfNeeded

        public void saveIntentIfNeeded​(@NonNull
                                       android.app.Activity activity)
        Check if the activity has a Batch push payload and saving it.
        Parameters:
        activity - the created activity
      • activityIsExcludedFromManifest

        public static boolean activityIsExcludedFromManifest​(@NonNull
                                                             android.app.Activity activity)
        Check if the activity has the EXCLUDE_FROM_LIFECYCLE meta-data info
        Parameters:
        activity - the activity to check
        Returns:
        true if the activity should be excluded from Batch
      • hasIntent

        public boolean hasIntent()
        Check if there's a pending ignored intent with a push payload
        Returns:
        true if there's one
      • popIntent

        public android.content.Intent popIntent()
        Return the pending ignored intent with a push payload and remove it.
        Returns:
        intent