Open PDFs from in-memory data on Android
Prefer random-access storage, usually a file, for PDF data. Keeping PDFs only in memory has two disadvantages:
- Memory limits — Large PDFs or devices with limited memory can cause
OutOfMemoryError. - Process recreation — An in-memory provider loses data across process recreations(opens in a new tab). Android can terminate your process when all app activities run in the background. When the app returns to the foreground, Android recreates the process without the provider’s data.
Nutrient removed MemoryDataProvider in Android SDK 3.1.1 because of these limitations. Use another data provider class that matches your data source.