Files
f0ckm-uploader/android/README.md
2026-08-12 22:09:29 +02:00

67 lines
2.5 KiB
Markdown

# fuggloader Android Integration
This directory contains solutions to integrate **fuggloader** directly into the **Android System Share Menu**.
## Features
- **Native Android App**: A lightweight wrapper that provides a "Share" target for images, videos, and URLs.
- **Automatic Clipboard**: Copies the generated post link directly to the Android Clipboard upon completion.
- **Configurable Settings**: Store API Endpoint URL, API Key, default rating (`sfw`/`nsfw`/`nsfl`), tags, and visibility.
### How to Build & Install
1. Open the `android/` directory in **Android Studio**.
2. Connect your Android phone via USB debugging or start an emulator.
3. Build & Run the project (or run `./gradlew assembleDebug` to build `app-debug.apk`).
4. Launch **fuggloader Uploader** on your phone:
- Enter your **API URL** (`https://your-fuggloader-site.com/api/v2/upload`)
- Enter your **API Key**
- Tap **Save Settings** -> **Test Connection**.
5. Open any image/video in your Gallery, or any URL in Chrome -> Tap **Share** -> Select **Upload to fuggloader**!
---
## Option 2: HTTP Shortcuts App (Zero Compilation Needed)
If you don't want to build an Android app manually, you can use the free open-source app **[HTTP Shortcuts](https://play.google.com/store/apps/details?id=ch.rmy.android.http_shortcuts)** (or from F-Droid).
### Quick Setup:
1. Install **HTTP Shortcuts** from Google Play or F-Droid.
2. Open **HTTP Shortcuts** -> Tap menu (3 dots) -> **Import / Export** -> **Import from file**.
3. Select `android/http-shortcuts-recipe.json`.
4. Edit the imported shortcut:
- Change `https://YOUR_SITE.com/api/v2/upload` to your API URL.
- Set header `X-Api-Key` to your API Key.
5. Save the shortcut. Now "Upload File to fuggloader" and "Upload URL to fuggloader" will appear in your native Android Share menu!
---
## Option 3: Web Share Target (PWA)
If you host the fuggloader web frontend, you can add a `share_target` entry to `manifest.json`:
```json
{
"name": "fuggloader",
"short_name": "fuggloader",
"start_url": "/",
"display": "standalone",
"share_target": {
"action": "/api/v2/upload",
"method": "POST",
"enctype": "multipart/form-data",
"params": {
"title": "title",
"text": "text",
"url": "url",
"files": [
{
"name": "file",
"accept": ["image/*", "video/*", "*/*"]
}
]
}
}
}
```
When users visit your fuggloader web app on Android Chrome and tap "Add to Home Screen", Android automatically registers it to the native Share menu.