Initial commit: Add MathHomeworkHelper project with web and Android components
Some checks reported errors
continuous-integration/drone Build encountered an error
Some checks reported errors
continuous-integration/drone Build encountered an error
This commit is contained in:
commit
f9558008e1
37 changed files with 5318 additions and 0 deletions
143
MathHomeworkHelper/README.md
Normal file
143
MathHomeworkHelper/README.md
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
# 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
|
||||
|
||||
1. Open Android Studio
|
||||
2. Click "Open an existing Android Studio project"
|
||||
3. Navigate to the `MathHomeworkHelper` directory and select it
|
||||
4. Wait for Gradle to sync
|
||||
5. Click "Build" → "Build Bundle(s) / APK(s)" → "Build APK(s)"
|
||||
|
||||
### Using Command Line
|
||||
|
||||
```bash
|
||||
cd MathHomeworkHelper
|
||||
./gradlew build
|
||||
```
|
||||
|
||||
To build a debug APK:
|
||||
```bash
|
||||
./gradlew assembleDebug
|
||||
```
|
||||
|
||||
To build a release APK:
|
||||
```bash
|
||||
./gradlew assembleRelease
|
||||
```
|
||||
|
||||
## Running the App
|
||||
|
||||
### On Android Studio Emulator
|
||||
|
||||
1. Create or select an Android Virtual Device (AVD)
|
||||
2. Click the "Run" button (green play icon)
|
||||
3. Select your emulator and click OK
|
||||
|
||||
### On Physical Device
|
||||
|
||||
1. Enable Developer Mode on your Android device
|
||||
2. Connect your device via USB
|
||||
3. Click the "Run" button in Android Studio
|
||||
4. 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 functionality
|
||||
- `ACCESS_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:
|
||||
|
||||
1. Go to "Build" → "Generate Signed Bundle / APK"
|
||||
2. Select "APK"
|
||||
3. Create or select a keystore
|
||||
4. Fill in the signing information
|
||||
5. Select "release" build type
|
||||
6. 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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue