Why do I need to enable largeHeap for my app?

Setting the optional android:largeHeap="true" flag in the AndroidManifest.xml file allows your application's processes to be created with a large Dalvik heap. PDF document rendering can be memory intensive and this flag is recommended to ensure that your application has enough heap memory allocated.

Example:

XML

1<?xml version="1.0" encoding="utf-8"?>
2<manifest ...>
3
4 <!-- Required permissions are added here -->
5 <uses-permission android:name="android.permission.INTERNET"/>
6 <uses-permission android:name="android.permission.RECORD_AUDIO" />
7
8 <!-- Add multidex support and enable largeHeap. Also enable usesCleartextTraffic in application attributes if you are working with HTTP files. If you are only working with HTTPS files, this is not required.-->
9 <application android:name="androidx.multidex.MultiDexApplication" + android:largeHeap="true" android:usesCleartextTraffic="false" ...>
10 ...
11 </application>
12</manifest>

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales