mathstuff/MathHomeworkHelper
Juan José Gutiérrez de Quevedo Pérez b907866c85
Some checks failed
continuous-integration/drone/push Build is failing
Refactor: Improve i18n support and fix multiplication steps layout
- Integrate i18n translations for difficulty descriptions
- Fix intermediate steps alignment in long multiplication display
- Simplify spacing calculations for better layout consistency
- Update translation files for all supported languages (en, es, el, sv)
2025-11-25 17:46:30 +01:00
..
app Refactor: Improve i18n support and fix multiplication steps layout 2025-11-25 17:46:30 +01:00
.gitignore Initial commit: Add MathHomeworkHelper project with web and Android components 2025-11-25 11:07:51 +01:00
build.gradle Initial commit: Add MathHomeworkHelper project with web and Android components 2025-11-25 11:07:51 +01:00
gradle.properties add docker build to pipeline 2025-11-25 13:11:09 +01:00
INDEX.md Initial commit: Add MathHomeworkHelper project with web and Android components 2025-11-25 11:07:51 +01:00
INSTALLATION.md Initial commit: Add MathHomeworkHelper project with web and Android components 2025-11-25 11:07:51 +01:00
PROJECT_SUMMARY.md Initial commit: Add MathHomeworkHelper project with web and Android components 2025-11-25 11:07:51 +01:00
QUICKSTART.md Initial commit: Add MathHomeworkHelper project with web and Android components 2025-11-25 11:07:51 +01:00
README.md Initial commit: Add MathHomeworkHelper project with web and Android components 2025-11-25 11:07:51 +01:00
settings.gradle Initial commit: Add MathHomeworkHelper project with web and Android components 2025-11-25 11:07:51 +01:00

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

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

  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.