Checking for Device Compatibility

You can include PSPDFKit in applications that will be distributed to devices not supported by PSPDFKit. In such a case, PSPDFKit.initialize() will throw PSPDFKitInitializationFailedException, which you must catch and handle appropriately:

try {
    PSPDFKit.initialize(context, LICENSE)
} catch (e : PSPDFKitInitializationFailedException) {
    Log.e(LOG_TAG, "Current device is not compatible with PSPDFKit!")
}
try {
    PSPDFKit.initialize(context, LICENSE);
} catch (PSPDFKitInitializationFailedException e) {
    Log.e(LOG_TAG, "Current device is not compatible with PSPDFKit!");
}