Some checks reported errors
continuous-integration/drone Build encountered an error
4.3 KiB
4.3 KiB
Math Homework Helper - Android App
This is an Android wrapper application that displays the Math Homework Helper web application using a WebView component.
Project Structure
MathHomeworkHelper/
├── app/
│ ├── src/main/
│ │ ├── java/com/example/mathhomeworkhelper/
│ │ │ └── MainActivity.java # Main activity with WebView
│ │ ├── res/
│ │ │ ├── layout/
│ │ │ │ └── activity_main.xml # Main layout with WebView
│ │ │ ├── values/
│ │ │ │ ├── strings.xml # String resources
│ │ │ │ └── styles.xml # App theme and colors
│ │ │ └── mipmap/ # App icons
│ │ ├── assets/
│ │ │ ├── index.html # Main HTML file
│ │ │ ├── styles.css # Stylesheets
│ │ │ ├── script.js # JavaScript logic
│ │ │ ├── translations.js # Translation logic
│ │ │ └── translations/ # Translation JSON files
│ │ └── AndroidManifest.xml # App manifest
│ ├── build.gradle # App-level build configuration
│ └── proguard-rules.pro # ProGuard rules
├── build.gradle # Project-level build configuration
├── settings.gradle # Gradle settings
└── README.md # This file
Requirements
- Android Studio (latest version recommended)
- Android SDK 21 or higher (minSdk)
- Target SDK 34
- Java 11 or higher
Building the Project
Using Android Studio
- Open Android Studio
- Click "Open an existing Android Studio project"
- Navigate to the
MathHomeworkHelperdirectory and select it - Wait for Gradle to sync
- Click "Build" → "Build Bundle(s) / APK(s)" → "Build APK(s)"
Using Command Line
cd MathHomeworkHelper
./gradlew build
To build a debug APK:
./gradlew assembleDebug
To build a release APK:
./gradlew assembleRelease
Running the App
On Android Studio Emulator
- Create or select an Android Virtual Device (AVD)
- Click the "Run" button (green play icon)
- Select your emulator and click OK
On Physical Device
- Enable Developer Mode on your Android device
- Connect your device via USB
- Click the "Run" button in Android Studio
- Select your device from the list
Features
- ✅ Displays HTML content in a WebView
- ✅ JavaScript enabled for interactive features
- ✅ Local storage and DOM storage support
- ✅ Zoom controls enabled
- ✅ Back button navigation support
- ✅ Multi-language support (English, Spanish, Swedish, Greek)
WebView Configuration
The MainActivity.java configures the WebView with the following settings:
- JavaScript: Enabled for interactive functionality
- DOM Storage: Enabled for local data persistence
- Database: Enabled for local storage
- Zoom Controls: Built-in zoom controls available
- File Access: Enabled to access local assets
- Mixed Content: Allowed for Android 5.0+
Permissions
The app requires the following permissions (defined in AndroidManifest.xml):
INTERNET: For WebView functionalityACCESS_NETWORK_STATE: To check network connectivity
Troubleshooting
WebView not loading content
- Ensure all HTML files are in the
app/src/main/assets/directory - Check that JavaScript is enabled in WebView settings
- Verify the file path in
webView.loadUrl()
JavaScript not working
- Confirm
setJavaScriptEnabled(true)is set in MainActivity - Check browser console for JavaScript errors
App crashes on startup
- Check the Logcat for error messages
- Ensure all required dependencies are in build.gradle
- Verify AndroidManifest.xml is properly configured
Building for Release
To create a signed release APK:
- Go to "Build" → "Generate Signed Bundle / APK"
- Select "APK"
- Create or select a keystore
- Fill in the signing information
- Select "release" build type
- Click "Finish"
License
This project wraps the Math Homework Helper web application for Android.
Support
For issues or questions, please refer to the original web application documentation.