chore: update release notes
This commit is contained in:
@@ -1,133 +0,0 @@
|
|||||||
# Android Widget Setup
|
|
||||||
|
|
||||||
The Android home screen widget is automatically included in the app build. This document describes the implementation details.
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
The widget uses **Material 3 / Material You** design with dynamic colors on Android 12+ (API 31+).
|
|
||||||
|
|
||||||
## Widget Design (Native Android)
|
|
||||||
|
|
||||||
```
|
|
||||||
┌─────────────────────────────────────┐
|
|
||||||
│ ✨ Ask Conduit │ ← Primary color (dynamic)
|
|
||||||
│ │
|
|
||||||
├───────────┬───────────┬─────────────┤
|
|
||||||
│ 📷 │ 🖼️ │ 📋 │
|
|
||||||
│ Camera │ Photos │ Clipboard │ ← Secondary container
|
|
||||||
└───────────┴───────────┴─────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
### Material You (Android 12+)
|
|
||||||
|
|
||||||
- **Primary button**: System accent color (`system_accent1_600`)
|
|
||||||
- **Secondary buttons**: Secondary container color (`system_accent2_100`)
|
|
||||||
- **Background**: Neutral surface color (`system_neutral1_10`)
|
|
||||||
- **Icons**: Tinted with `system_accent1_700`
|
|
||||||
|
|
||||||
### Fallback (Android 11 and below)
|
|
||||||
|
|
||||||
- **Primary button**: Material 3 default purple (`#6750A4`)
|
|
||||||
- **Secondary buttons**: Light purple container (`#E8DEF8`)
|
|
||||||
- **Background**: Near-white surface (`#FFFBFE`)
|
|
||||||
|
|
||||||
## Files Structure
|
|
||||||
|
|
||||||
```
|
|
||||||
android/app/src/main/
|
|
||||||
├── kotlin/.../ConduitWidgetProvider.kt # Widget logic
|
|
||||||
├── res/
|
|
||||||
│ ├── layout/
|
|
||||||
│ │ └── conduit_widget.xml # Widget layout
|
|
||||||
│ ├── drawable/
|
|
||||||
│ │ ├── widget_background.xml # Surface background
|
|
||||||
│ │ ├── widget_button_primary.xml # Primary button
|
|
||||||
│ │ ├── widget_button_secondary.xml # Secondary buttons
|
|
||||||
│ │ ├── ic_widget_camera.xml # Camera icon
|
|
||||||
│ │ ├── ic_widget_photos.xml # Photos icon
|
|
||||||
│ │ ├── ic_widget_clipboard.xml # Clipboard icon
|
|
||||||
│ │ └── widget_preview.xml # Widget picker preview
|
|
||||||
│ ├── drawable-v31/ # Material You overrides
|
|
||||||
│ │ └── (same files with dynamic colors)
|
|
||||||
│ ├── values/
|
|
||||||
│ │ ├── colors.xml # Light mode colors
|
|
||||||
│ │ ├── dimens.xml # Widget dimensions
|
|
||||||
│ │ └── strings.xml # Widget strings
|
|
||||||
│ ├── values-night/
|
|
||||||
│ │ └── colors.xml # Dark mode colors
|
|
||||||
│ └── xml/
|
|
||||||
│ └── conduit_widget_info.xml # Widget metadata
|
|
||||||
└── AndroidManifest.xml # Widget receiver registration
|
|
||||||
```
|
|
||||||
|
|
||||||
## Deep Link Handling
|
|
||||||
|
|
||||||
The widget uses `homewidget://` URL scheme:
|
|
||||||
|
|
||||||
| Action | URL |
|
|
||||||
|--------|-----|
|
|
||||||
| New Chat | `homewidget://new_chat` |
|
|
||||||
| Camera | `homewidget://camera` |
|
|
||||||
| Photos | `homewidget://photos` |
|
|
||||||
| Clipboard | `homewidget://clipboard` |
|
|
||||||
|
|
||||||
## Widget Configuration
|
|
||||||
|
|
||||||
The widget is configured in `res/xml/conduit_widget_info.xml`:
|
|
||||||
|
|
||||||
- **Min size**: 250x110dp (3x2 cells)
|
|
||||||
- **Resizable**: Horizontal and vertical
|
|
||||||
- **Category**: Home screen
|
|
||||||
- **Update period**: Never (static widget)
|
|
||||||
|
|
||||||
## Testing
|
|
||||||
|
|
||||||
1. Build and install the debug APK:
|
|
||||||
```bash
|
|
||||||
flutter build apk --debug
|
|
||||||
flutter install
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Long press on home screen
|
|
||||||
3. Tap "Widgets"
|
|
||||||
4. Search for "Conduit"
|
|
||||||
5. Drag widget to home screen
|
|
||||||
|
|
||||||
## Customization
|
|
||||||
|
|
||||||
### Changing the accent color
|
|
||||||
|
|
||||||
The widget automatically picks up the system's Material You palette on Android 12+. On older versions, modify the fallback colors in `values/colors.xml`:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<color name="widget_primary_fallback">#YOUR_COLOR</color>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Changing widget size
|
|
||||||
|
|
||||||
Modify `res/xml/conduit_widget_info.xml`:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<appwidget-provider
|
|
||||||
android:minWidth="250dp"
|
|
||||||
android:minHeight="110dp"
|
|
||||||
android:targetCellWidth="3"
|
|
||||||
android:targetCellHeight="2"
|
|
||||||
...
|
|
||||||
/>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
### Widget not appearing
|
|
||||||
|
|
||||||
- Ensure the app was installed (not just built)
|
|
||||||
- Try restarting the home launcher
|
|
||||||
- Check that `ConduitWidgetProvider` is registered in AndroidManifest.xml
|
|
||||||
|
|
||||||
### Colors not updating on theme change
|
|
||||||
|
|
||||||
- Widget colors are set at creation time
|
|
||||||
- User needs to re-add widget after theme change
|
|
||||||
- Or trigger update via `HomeWidget.updateWidget()` from Flutter
|
|
||||||
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
# iOS Widget Extension Setup
|
|
||||||
|
|
||||||
This document describes how the ConduitWidget extension was added and how to configure it.
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
The widget extension was created via Xcode and provides quick access buttons:
|
|
||||||
|
|
||||||
- **Ask Conduit** - Opens app with new chat, focuses composer
|
|
||||||
- **Camera** - Opens app, creates new chat, launches camera
|
|
||||||
- **Photos** - Opens app, creates new chat, opens photo picker
|
|
||||||
- **Clipboard** - Opens app with clipboard contents as prompt
|
|
||||||
|
|
||||||
## Files Structure
|
|
||||||
|
|
||||||
```
|
|
||||||
ios/ConduitWidget/
|
|
||||||
├── Assets.xcassets/ # Asset catalog
|
|
||||||
│ ├── AccentColor.colorset/ # Theme accent color
|
|
||||||
│ ├── AppIcon.appiconset/ # Widget icon (uses app icon)
|
|
||||||
│ └── WidgetBackground.colorset/ # Light/dark backgrounds
|
|
||||||
├── ConduitWidget.entitlements # App group for data sharing
|
|
||||||
├── ConduitWidget.swift # Main widget implementation
|
|
||||||
├── ConduitWidgetBundle.swift # Widget bundle entry point
|
|
||||||
└── Info.plist # Extension configuration
|
|
||||||
```
|
|
||||||
|
|
||||||
## App Group Configuration
|
|
||||||
|
|
||||||
Both the main app and widget share data via the app group `group.app.cogwheel.conduit`.
|
|
||||||
|
|
||||||
**Important:** Ensure both targets have this app group in their capabilities:
|
|
||||||
|
|
||||||
1. Select the **Runner** target → Signing & Capabilities → App Groups
|
|
||||||
2. Verify `group.app.cogwheel.conduit` is listed
|
|
||||||
|
|
||||||
3. Select the **ConduitWidget** target → Signing & Capabilities → App Groups
|
|
||||||
4. Verify `group.app.cogwheel.conduit` is listed
|
|
||||||
|
|
||||||
## Deep Link Handling
|
|
||||||
|
|
||||||
The widget uses `homewidget://` URL scheme to communicate with the Flutter app:
|
|
||||||
|
|
||||||
| Action | URL |
|
|
||||||
|--------|-----|
|
|
||||||
| New Chat | `homewidget://new_chat` |
|
|
||||||
| Camera | `homewidget://camera` |
|
|
||||||
| Photos | `homewidget://photos` |
|
|
||||||
| Clipboard | `homewidget://clipboard` |
|
|
||||||
|
|
||||||
These are handled by `HomeWidgetCoordinator` in the Flutter code.
|
|
||||||
|
|
||||||
## Widget Design (Native iOS)
|
|
||||||
|
|
||||||
```
|
|
||||||
┌─────────────────────────────────────┐
|
|
||||||
│ ✨ Ask Conduit │ ← System tint color
|
|
||||||
│ │
|
|
||||||
├───────────┬───────────┬─────────────┤
|
|
||||||
│ 📷 │ 🖼️ │ 📋 │
|
|
||||||
│ Camera │ Photos │ Clipboard │ ← Secondary system bg
|
|
||||||
└───────────┴───────────┴─────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
- **Size**: Medium widget (systemMedium)
|
|
||||||
- **Primary button**: System tint color (follows app accent)
|
|
||||||
- **Secondary buttons**: `secondarySystemGroupedBackground`
|
|
||||||
- **Icons**: SF Symbols with hierarchical rendering
|
|
||||||
- **Typography**: SF Rounded font
|
|
||||||
- **Supports**: Light/dark mode, Dynamic Type
|
|
||||||
|
|
||||||
## Building
|
|
||||||
|
|
||||||
The widget extension is built automatically when you build the main app:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
flutter build ios
|
|
||||||
```
|
|
||||||
|
|
||||||
Or build from Xcode:
|
|
||||||
|
|
||||||
1. Open `ios/Runner.xcworkspace`
|
|
||||||
2. Select the **Runner** scheme
|
|
||||||
3. Build (⌘B)
|
|
||||||
|
|
||||||
## Testing
|
|
||||||
|
|
||||||
1. Build and run the main app on a device/simulator
|
|
||||||
2. Go to home screen
|
|
||||||
3. Long press → tap **+** to add widgets
|
|
||||||
4. Search for "Conduit"
|
|
||||||
5. Add the medium widget
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
### Widget not appearing in picker
|
|
||||||
|
|
||||||
- Ensure the widget extension builds without errors
|
|
||||||
- Check deployment target is iOS 17.0+
|
|
||||||
- Clean build folder (⇧⌘K) and rebuild
|
|
||||||
|
|
||||||
### Widget actions don't work
|
|
||||||
|
|
||||||
- Verify the `homewidget://` URL scheme is handled
|
|
||||||
- Check `HomeWidgetCoordinator` is initialized in app startup
|
|
||||||
- Ensure app group is configured on both targets
|
|
||||||
|
|
||||||
### Widget doesn't update
|
|
||||||
|
|
||||||
- The widget uses `.never` refresh policy (static content)
|
|
||||||
- Call `HomeWidget.updateWidget()` from Flutter to trigger refresh
|
|
||||||
|
|
||||||
## Adding to a Fresh Clone
|
|
||||||
|
|
||||||
If cloning the repo fresh, the widget extension should already be configured in the Xcode project. Just ensure:
|
|
||||||
|
|
||||||
1. Team/signing is set for both targets
|
|
||||||
2. App groups capability is enabled
|
|
||||||
3. Pod install has been run
|
|
||||||
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
submit_for_review(true)
|
submit_for_review(true)
|
||||||
skip_metadata(false)
|
skip_metadata(false)
|
||||||
release_notes({
|
release_notes({
|
||||||
'default' => "https://github.com/cogwheel0/conduit/releases/tag/v2.3.1",
|
'default' => "Home screen widget support, bug fixes, and performance improvements.",
|
||||||
})
|
})
|
||||||
promotional_text({'default' => "https://github.com/cogwheel0/conduit/releases/tag/v2.3.1"})
|
promotional_text({'default' => "https://github.com/cogwheel0/conduit/releases/tag/v2.3.1"})
|
||||||
skip_screenshots(true)
|
skip_screenshots(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user