Interface for an abstraction of pageable static data from some source, where loading pages of data is typically an expensive operation. Some examples of common PagingSources might be from network or from a database.
This class substitutes the Android's PagingSource class. See PagingSource for details. The IVI service framework uses a substitute to allow the source to be implemented at the service side. Mirroring the PagingSource one to one on the client side is not possible as some of the PagingSource API cannot block on IO. Also to allow the IVI service framework integrate seamlessly with the Android paging library, the construction of the PagingSource class cannot be blocked on IO. For this reason the IviPagingSource class deviates at four points from the PagingSource class:
IviPagingSource does not have a
Keyparameterized type. The IviPagingSource always uses an index to define which data to load. This is required to be able to implement PagingSource.getRefreshKey solely on the client side.