# How to Create an Android App (APK) for Ghadget

Since you are running this project as a web application (HTML/JS/PHP), the best way to turn it into an Android App is by converting it into a **Trusted Web Activity (TWA)** or a **Progressive Web App (PWA)** wrapped in an APK.

Here are the 3 best methods, ranked from Easiest to Best Quality.

## Method 1: Use a Website-to-APK Converter (Easiest)

This is great for quick testing but not recommended for the Play Store.

1. **Host your website.** (You already have it on cPanel/online).
2. Go to **[AppsGeyser](https://appsgeyser.com/)** or **[WebIntoApp](https://www.webintoapp.com/)**.
3. Enter your website URL (e.g., `https://your-domain.com/Gwap/home.html`).
4. Upload your icon.
5. Click **Download APK**.
6. Install it on your phone.

## Method 2: PWABuilder (Standard)

This creates a real Android Studio project for you.

1. Ensure your website is live and has an SSL certificate (HTTPS).
2. Go to **[PWABuilder.com](https://www.pwabuilder.com/)**.
3. Enter your website URL.
4. It will score your PWA. (You might need a `manifest.json` file - see below).
5. Click **Package for Stores** -> **Android**.
6. Download the **APK** or **AAB** bundle.

## Method 3: Capacitor (Developer Standard)

This allows you to build the app locally on your computer.

1. **Install Node.js** if you haven't.
2. Open your project folder in terminal.
3. Run:

    ```bash
    npm init capacitor-app
    ```

4. Point the "Web Dir" to your `Gwap` folder.
5. Run:

    ```bash
    npx cap add android
    npx cap open android
    ```

6. This opens **Android Studio**. From there, you can press "Play" to run it on your plugged-in phone or "Build APK".

---

## Required: Manifest File (manifest.json)

For Method 2 or general "Install to Home Screen" support, create a file named `manifest.json` in your `Gwap` folder:

```json
{
  "name": "GhadgetGo",
  "short_name": "Ghadget",
  "start_url": "./home.html",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#000000",
  "icons": [
    {
      "src": "icon-192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "icon-512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ]
}
```

Link it in your `home.html` `<head>`:

```html
<link rel="manifest" href="manifest.json">
```
