Menu

1 / 2

How We Built PDF OCR with Zero INTERNET Permission on Android

DEV Community: kotlin·securepdfeditor·about 19 hours ago
#gC4zn83G
#devtokotlin#devto#dev#searchable#device
Reading 0:00
15s threshold

An Android app that declares no INTERNET permission cannot download models. That is the whole problem, and it shaped every other decision in this post.

This is VaultPDF, an offline PDF editor ( com.securepdfeditor.pro , v2.0.1). Scanned PDFs become searchable, and can also be rebuilt into editable documents. Everything below runs on device.

1. "No INTERNET permission" is an artifact property, not a promise

Most "offline" claims are behavioral: the app says it does not upload. Ours is structural. The manifest strips the permission at merge time:

<uses-permission android:name= "android.permission.INTERNET" tools:node= "remove" /> <uses-permission android:name= "android.permission.ACCESS_NETWORK_STATE" tools:node= "remove" />

Enter fullscreen mode

Exit fullscreen mode

Every release bundle is checked with aapt2 dump permissions , and the release is blocked if INTERNET reappears through a transitive dependency.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.