Batch Inbox Fetcher
BatchInboxFetcher allows you to fetch notifications that have been sent to a user (or installation, more on that later) in their raw form, allowing you to display them in a list, for example. This is also useful to display messages to users that disabled notifications.
Once you get your BatchInboxFetcher instance, you should call fetchNewNotifications to fetch the initial page of messages: nothing is done automatically. This method is also useful to refresh the list.
In an effort to minimize network and memory usage, messages are fetched by page (batches of messages): this allows you to easily create an infinite list, loading more messages on demand. While you can configure the maximum number of messages you want in a page, the actual number of returned messages can differ, as the SDK may filter some of the messages returned by the server (such as duplicate notifications, etc...).
As BatchInboxFetcher caches answers from the server, instances of this class should be tied to the lifecycle of the UI consuming it (if applicable). For example, you should keep a reference to this object during your Activity's entire life. Another reason to keep the object around, is that you cannot mark a message as read with another BatchInbox instance that the one that gave you the message in the first place.
A BatchInboxFetcher instance will hold to all fetched messages: be careful of how long you're keeping the instances around. You can also set a upper messages limit, after which BatchInbox will stop fetching new messages, even if you call fetchNextPage.
Note: You will always be called back on the thread that you instantiated BatchInboxFetcher on. use setHandlerOverride if you want to change that behaviour.