---
title: "How to allow cleartext traffic"
canonical_url: "https://www.nutrient.io/guides/android/knowledge-base/allow-clear-text-traffic/"
md_url: "https://www.nutrient.io/guides/android/knowledge-base/allow-clear-text-traffic.md"
last_updated: "2026-06-09T10:32:17.001Z"
description: "Learn how to configure your server for cleartext traffic on Android 9 and resolve connection errors with Document Engine's Instant feature."
---

You could be using non-secure connection to Document Engine in various circumstances — for example, while using our [examples](https://www.nutrient.io/guides/android/pspdfkit-instant/getting-started.md#quick-start-with-the-example-project), or while developing on your own local server without setting up HTTPS. This used to work fine on older Android versions, however, since Android 9 (API level 28), cleartext support is disabled by default.

When the cleartext traffic is disabled by the network security policy, you’ll encounter the following errors when connecting to your server with Instant:

```

E/Instant::Sync: Could not authenticate default layer of document '***' for download: InstantError 5: Connection dropped"

```

Or:

```

E/Instant::Sync: Could not authenticate default layer of document '***' for download: InstantError 5: CLEARTEXT communication to *** not permitted by network security policy

```

### How to enable cleartext traffic with your server

To allow a cleartext connection to your development server, you’ll need to set up a network security policy configuration in your `<application>` tag inside `AndroidManifest.xml`:

```xml

<application android:networkSecurityConfig="@xml/network_security_config">

```

Specify the configuration for your domain inside the network security configuration file:

```xml

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">your_server_domain</domain>
    </domain-config>
</network-security-config>

```

For more information about the network security configuration, refer to the [Network Security Configuration guides](https://developer.android.com/training/articles/security-config).
---

## Related pages

- [Compose Qna](/guides/android/knowledge-base/compose-qna.md)
- [Custom Print Functionality](/guides/android/knowledge-base/custom-print-functionality.md)
- [Deleting Pages From A Pdf](/guides/android/knowledge-base/deleting-pages-from-a-pdf.md)
- [Easily disable share and print options in Android](/guides/android/knowledge-base/disable-share-documentinfo-print.md)
- [Disabling Annotation Rotation](/guides/android/knowledge-base/disabling-annotation-rotation.md)
- [Change page layout dynamically based on orientation](/guides/android/knowledge-base/dynamic-page-layout-when-changing-orientation.md)
- [Managing touch scrolling in Compose containers](/guides/android/knowledge-base/document-view-inside-pager-scroll-handling.md)
- [Getting Signature Location](/guides/android/knowledge-base/getting-signature-location.md)
- [Install Failed Insufficient Storage](/guides/android/knowledge-base/install-failed-insufficient-storage.md)
- [Intercepting Touch Events](/guides/android/knowledge-base/intercepting-touch-events.md)
- [Getting All Digital Signatures](/guides/android/knowledge-base/getting-all-digital-signatures.md)
- [Invoke Search Programmatically](/guides/android/knowledge-base/invoke-search-programmatically.md)
- [Creating invisible digital signatures in Android](/guides/android/knowledge-base/invisible-signature.md)
- [Invoking Share Action Programmatically](/guides/android/knowledge-base/invoking-share-action-programmatically.md)
- [Override Hyperlink Behavior](/guides/android/knowledge-base/override-hyperlink-behavior.md)
- [Making Form Elements Read Only](/guides/android/knowledge-base/making-form-elements-read-only.md)
- [Remove Tool Variant From Toolbar](/guides/android/knowledge-base/remove-tool-variant-from-toolbar.md)
- [Runtime Permissions Cordova](/guides/android/knowledge-base/runtime-permissions-cordova.md)
- [Save signed PDFs directly to a remote server on Android](/guides/android/knowledge-base/save-signed-pdfs-to-remote-server.md)
- [Customize the overflow button color in Android](/guides/android/knowledge-base/styling-overflow-button.md)
- [Using Pspdfkit With Dynamic Feature Modules](/guides/android/knowledge-base/using-pspdfkit-with-dynamic-feature-modules.md)

