A lightweight Android app designed to open .dzy files, which are ZIP-like archives containing index.html, styles.css, and assets, displaying them in a WebView.
- The app registers an intent filter in
AndroidManifest.xmlto handle.dzyfiles from bothfile://andcontent://URIs. - When a user selects a
.dzyfile, the system sends the file URI toMainActivity.java.
- Since
.dzyis a ZIP-like format, the app extracts its contents into the app's private storage. - The extraction process:
- Reads the
.dzyfile using aZipInputStream. - Extracts
index.html,styles.css, and other assets into a temporary directory. - Ensures security by restricting access to extracted files.
- Reads the
- After extraction, the WebView loads
index.htmlfrom the extracted directory. - JavaScript and CSS are enabled for proper rendering.
- If the file fails to load, the app displays a custom error page.
- If the
.dzyfile is corrupted, missingindex.html, or unreadable, a custom error page is shown usingloadData()in WebView.
- The app does not appear in the app drawer by modifying the
AndroidManifest.xmlto remove the launcher intent filter. - It can only be accessed when opening a
.dzyfile from another app.
- Java (No AppCompat or AndroidX)
- Android WebView for displaying extracted HTML content
- ZipInputStream for extracting
.dzyarchives - Intent Filters for handling file opening
- Files are extracted into private storage (
getCacheDir()orgetFilesDir()). - No external storage permissions are required.
- Auto-clearing data prevents leftover extracted files.