Class Batch.Inbox

  • Enclosing class:
    Batch

    public static final class Batch.Inbox
    extends java.lang.Object
    Batch Inbox module
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static BatchInboxFetcher getFetcher​(android.content.Context context)
      Get an inbox fetcher based on the current installation ID.
      static BatchInboxFetcher getFetcher​(android.content.Context context, java.lang.String userIdentifier, java.lang.String authenticationKey)
      Get an inbox fetcher for the specified user identifier.
      static BatchInboxFetcher getFetcher​(java.lang.String userIdentifier, java.lang.String authenticationKey)
      Deprecated.
      Use getFetcher(Context,String,String), which is more reliable
      • Methods inherited from class java.lang.Object

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

      • getFetcher

        @NonNull
        public static BatchInboxFetcher getFetcher​(@NonNull
                                                   android.content.Context context)
        Get an inbox fetcher based on the current installation ID. Batch must be started for all of the fetcher's features to work, but you can call this method before starting Batch (such as in your activity's onCreate)
        Parameters:
        context - A valid context. Note that the fetcher will hold on to it during its lifetime, so the application context might be more appropriate depending on your usage.
        Returns:
        an instance of BatchInboxFetcher with the wanted configuration
      • getFetcher

        @NonNull
        public static BatchInboxFetcher getFetcher​(@NonNull
                                                   android.content.Context context,
                                                   @NonNull
                                                   java.lang.String userIdentifier,
                                                   @NonNull
                                                   java.lang.String authenticationKey)
        Get an inbox fetcher for the specified user identifier. Batch must be started for all of the fetcher's features to work, but you can call this method before starting Batch (such as in your activity's onCreate)
        Parameters:
        context - A valid context. Note that the fetcher will hold on to it during its lifetime, so the application context might be more appropriate depending on your usage.
        userIdentifier - User identifier for which you want the notifications
        authenticationKey - Secret authentication key: it should be computed your backend and given to this method
        Returns:
        an instance of BatchInboxFetcher with the wanted configuration
      • getFetcher

        @Deprecated
        @NonNull
        public static BatchInboxFetcher getFetcher​(@NonNull
                                                   java.lang.String userIdentifier,
                                                   @NonNull
                                                   java.lang.String authenticationKey)
        Deprecated.
        Use getFetcher(Context,String,String), which is more reliable
        Get an inbox fetcher for the specified user identifier. Batch must be started for all of the fetcher's features to work, but you can call this method before starting Batch (such as in your activity's onCreate)
        Parameters:
        userIdentifier - User identifier for which you want the notifications
        authenticationKey - Secret authentication key: it should be computed your backend and given to this method
        Returns:
        an instance of BatchInboxFetcher with the wanted configuration