# HikeMap APK Generation Instructions ## Quick Solution: Use PWA2APK.com (Recommended) The current APK in the repository won't install because it's not properly compiled. To create a working APK quickly: ### Steps: 1. **Go to PWA2APK.com** - Visit: https://www.pwa2apk.com 2. **Enter Your PWA URL** - URL: `https://maps.bibbit.duckdns.org` - Click "Start" 3. **Configure Settings** - App Name: HikeMap Trail Navigator - Short Name: HikeMap - Package ID: org.duckdns.bibbit.hikemap - Leave other settings as default 4. **Generate APK** - Click "Generate APK" - Wait for processing (usually 1-2 minutes) 5. **Download APK** - Download the generated APK file - This APK will be properly signed and ready to install ## Why the Current APK Doesn't Work The APK currently in the repository (`output/hikemap.apk`) was generated using a simple Python script that creates a basic ZIP structure. However, Android APKs require: 1. **Compiled DEX bytecode** (`classes.dex`) - The Python script didn't compile any Java code 2. **Digital signature** - The APK isn't properly signed with a certificate 3. **Compiled resources** (`resources.arsc`) - Android resources must be compiled 4. **Binary XML** - Android requires compiled XML, not plain text XML ## Alternative: Local Build (Advanced) If you want to build locally, you need: 1. Android SDK installed 2. Java JDK 17 or higher 3. Bubblewrap CLI or Android Studio The Docker build process is set up in `build-tools/` but requires significant download time for dependencies. ## Temporary Solution Until a proper APK is built, users can: 1. **Use the PWA directly** - Visit https://maps.bibbit.duckdns.org on Android 2. **Add to Home Screen** - Chrome/Firefox will create an app-like shortcut 3. **Wait for PWA2APK** - Use the service above to generate a proper APK ## Next Steps 1. Generate a proper APK using PWA2APK.com 2. Replace the invalid APK in the repository 3. Update the release with the working APK 4. Test on multiple Android devices ## Testing the APK Once you have a proper APK: 1. Enable "Install from unknown sources" in Android settings 2. Download the APK to your phone 3. Open the APK file 4. Follow installation prompts 5. Grant location permissions when requested The app should then work as a native Android application with full PWA capabilities.