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.xml
to handle.dzy
files from bothfile://
andcontent://
URIs. - When a user selects a
.dzy
file, the system sends the file URI toMainActivity.java
.
- Since
.dzy
is a ZIP-like format, the app extracts its contents into the app's private storage. - The extraction process:
- Reads the
.dzy
file 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.html
from 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
.dzy
file 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.xml
to remove the launcher intent filter. - It can only be accessed when opening a
.dzy
file from another app.
- Java (No AppCompat or AndroidX)
- Android WebView for displaying extracted HTML content
- ZipInputStream for extracting
.dzy
archives - 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.