Skip to content

Commit 4bd06fc

Browse files
authored
Merge pull request #1 from j-almenara-r/copilot/create-basic-voice-notes-app
Add minimal Android voice dictation app for driving safety
2 parents fe0cb9e + 1f8aa4a commit 4bd06fc

29 files changed

Lines changed: 1660 additions & 2 deletions

.github/workflows/build-apk.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build Android APK
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: '17'
23+
distribution: 'temurin'
24+
cache: gradle
25+
26+
- name: Grant execute permission for gradlew
27+
run: chmod +x gradlew
28+
29+
- name: Build with Gradle
30+
run: ./gradlew assembleDebug --stacktrace
31+
32+
- name: Upload APK
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: app-debug
36+
path: app/build/outputs/apk/debug/app-debug.apk
37+
if-no-files-found: error
38+
39+
- name: Create Release (on main branch only)
40+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
41+
uses: softprops/action-gh-release@v1
42+
with:
43+
tag_name: build-${{ github.run_number }}
44+
name: Build ${{ github.run_number }}
45+
body: |
46+
Automated build from commit ${{ github.sha }}
47+
48+
Download the APK below and install it on your Android device.
49+
files: app/build/outputs/apk/debug/app-debug.apk
50+
draft: false
51+
prerelease: false
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Android build files
2+
*.iml
3+
.gradle
4+
/local.properties
5+
/.idea/
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild
10+
.cxx
11+
*.apk
12+
*.ap_
13+
*.dex
14+
*.class
15+
bin/
16+
gen/
17+
out/
18+
19+
# Gradle files
20+
.gradle/
21+
build/
22+
23+
# Local configuration file (sdk path, etc)
24+
local.properties
25+
26+
# Log Files
27+
*.log
28+
29+
# Android Studio
30+
*.iml
31+
.idea/
32+
.navigation/
33+
captures/
34+
output.json
35+
36+
# NDK
37+
obj/

APP_OVERVIEW.md

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
╔═══════════════════════════════════════╗
2+
║ VOICE NOTES APP ║
3+
║ User Interface Layout ║
4+
╚═══════════════════════════════════════╝
5+
6+
┌─────────────────────────────────────┐
7+
│ │
8+
│ Voice Notes │ <- App Title (bold, 24sp)
9+
│ │
10+
├─────────────────────────────────────┤
11+
│ │
12+
│ ╔═══════════════════════════════╗ │
13+
│ ║ ║ │
14+
│ ║ Your notes will appear ║ │ <- Scrollable notes area
15+
│ ║ here... ║ │ (initially shows placeholder)
16+
│ ║ ║ │
17+
│ ║ [10:30:15] Pick up groceries ║ │ <- Example note with timestamp
18+
│ ║ ║ │
19+
│ ║ [10:35:42] Call dentist ║ │ <- Another example note
20+
│ ║ tomorrow morning ║ │
21+
│ ║ ║ │
22+
│ ║ ║ │
23+
│ ╚═══════════════════════════════╝ │
24+
│ │
25+
├─────────────────────────────────────┤
26+
│ │
27+
│ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ │
28+
│ ┃ 🎤 Tap to Speak ┃ │ <- Large button (easy to tap)
29+
│ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ │
30+
│ │
31+
└─────────────────────────────────────┘
32+
33+
USER FLOW:
34+
──────────
35+
36+
1. Launch App
37+
└─> Grant microphone permission (first time only)
38+
39+
2. Tap "🎤 Tap to Speak" button
40+
└─> Android speech recognition dialog appears
41+
42+
3. Speak your note
43+
└─> "Speak your note..." prompt shown
44+
└─> Voice indicator animates
45+
46+
4. Finish speaking
47+
└─> Recognition processes speech
48+
└─> Note appears with timestamp
49+
└─> Scroll automatically to show new note
50+
51+
5. Repeat as needed!
52+
53+
FEATURES IN ACTION:
54+
──────────────────
55+
56+
✓ Large tap target - Easy to hit while driving
57+
✓ Voice-first - No typing ever needed
58+
✓ Auto-timestamp - Know when each note was created
59+
✓ Auto-scroll - Latest note always visible
60+
✓ Dark mode - Respects system theme
61+
✓ Simple - One screen, one purpose
62+
63+
PERMISSION FLOW:
64+
───────────────
65+
66+
First Launch:
67+
1. App opens
68+
2. User taps microphone button
69+
3. Android shows permission dialog:
70+
"Allow Voice Notes to record audio?"
71+
[Deny] [Allow]
72+
4. User taps [Allow]
73+
5. Speech recognition starts immediately
74+
75+
Subsequent Launches:
76+
1. App opens
77+
2. User taps microphone button
78+
3. Speech recognition starts immediately
79+
(no permission prompt - already granted)
80+
81+
SPEECH RECOGNITION DIALOG:
82+
─────────────────────────
83+
84+
┌─────────────────────────┐
85+
│ Speak your note... │ <- Prompt text
86+
│ │
87+
│ 🎤 │ <- Animated microphone
88+
│ ▂▄▆▇█▇▆▄▂ │ <- Voice level indicator
89+
│ │
90+
│ "Pick up groceries" │ <- Real-time transcription
91+
│ │
92+
[Cancel] │ <- Cancel button
93+
└─────────────────────────┘
94+
95+
NOTES DISPLAY:
96+
─────────────
97+
98+
Initial state:
99+
┌──────────────────────┐
100+
│ Your notes will │
101+
│ appear here... │
102+
└──────────────────────┘
103+
104+
After first note:
105+
┌──────────────────────┐
106+
[10:30:15] Pick up │
107+
│ groceries │
108+
└──────────────────────┘
109+
110+
After multiple notes:
111+
┌──────────────────────┐
112+
[10:30:15] Pick up │
113+
│ groceries │
114+
│ │
115+
[10:35:42] Call │
116+
│ dentist tomorrow │
117+
│ morning │
118+
│ │
119+
[11:02:09] Email │
120+
│ project update to │
121+
│ team │
122+
└──────────────────────┘
123+
124+
KEY DESIGN DECISIONS:
125+
────────────────────
126+
127+
• Single button: Reduces cognitive load
128+
• Large text: Easy to read at a glance
129+
• Timestamps: Provide context
130+
• Scrollable: Handle many notes
131+
• Material Design: Familiar Android look
132+
• Theme-aware: Dark/light mode support
133+
• No delete button: Minimizes interaction
134+
• Notes are temporary: Session-based
135+
136+
TYPICAL USAGE WHILE DRIVING:
137+
───────────────────────────
138+
139+
Scenario: Remember to buy groceries
140+
141+
1. Glance at phone at red light
142+
2. Tap large microphone button
143+
3. Speak: "Pick up groceries after work"
144+
4. Done! Note saved with timestamp
145+
5. Light turns green, continue driving
146+
147+
Total interaction time: ~5 seconds
148+
149+
Much safer than:
150+
- Typing on keyboard
151+
- Fighting with AI assistant
152+
- Dealing with recognition failures
153+
- Multiple app interactions
154+

BUILD_INSTRUCTIONS.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# Build Instructions for Voice Notes App
2+
3+
## Prerequisites
4+
5+
You need one of the following:
6+
1. **Android Studio** (recommended - easiest method)
7+
2. **Command line tools** with Android SDK installed
8+
9+
## Method 1: Using Android Studio (Recommended)
10+
11+
### Step-by-Step:
12+
13+
1. **Install Android Studio**
14+
- Download from: https://developer.android.com/studio
15+
- Install with default settings
16+
- Launch Android Studio and complete the setup wizard
17+
18+
2. **Clone the Repository**
19+
```bash
20+
git clone https://github.com/j-almenara-r/studious-garbanzo.git
21+
```
22+
23+
3. **Open Project in Android Studio**
24+
- Launch Android Studio
25+
- Click "Open"
26+
- Navigate to the `studious-garbanzo` folder
27+
- Click "OK"
28+
- Wait for Gradle sync to complete (this may take a few minutes the first time)
29+
30+
4. **Build the APK**
31+
- Click **Build** menu → **Build Bundle(s) / APK(s)****Build APK(s)**
32+
- Wait for the build to complete (you'll see a notification)
33+
- Click "locate" in the notification to find the APK
34+
35+
OR use the toolbar:
36+
- Click the hammer icon (🔨) to build
37+
- Then go to `app/build/outputs/apk/debug/app-debug.apk`
38+
39+
5. **Transfer APK to Your Phone**
40+
- Option A: Connect phone via USB, copy the APK file
41+
- Option B: Email the APK to yourself
42+
- Option C: Upload to Google Drive/Dropbox and download on phone
43+
44+
6. **Install on Samsung Galaxy S25**
45+
- Locate the APK file on your phone
46+
- Tap to install
47+
- If prompted, allow installation from this source
48+
- Grant microphone permission when app asks
49+
50+
## Method 2: Command Line Build
51+
52+
### Prerequisites:
53+
- Java JDK 8 or higher installed
54+
- Android SDK installed (via Android Studio or standalone)
55+
- `ANDROID_HOME` environment variable set
56+
57+
### Commands:
58+
59+
```bash
60+
# Clone repository
61+
git clone https://github.com/j-almenara-r/studious-garbanzo.git
62+
cd studious-garbanzo
63+
64+
# Build debug APK
65+
./gradlew assembleDebug
66+
67+
# APK location
68+
# app/build/outputs/apk/debug/app-debug.apk
69+
70+
# Install directly to connected device (optional)
71+
adb install app/build/outputs/apk/debug/app-debug.apk
72+
```
73+
74+
## Method 3: Using GitHub Actions (if configured)
75+
76+
If GitHub Actions is set up for this repository, you can:
77+
1. Go to the "Actions" tab on GitHub
78+
2. Run the build workflow
79+
3. Download the built APK from the workflow artifacts
80+
81+
## Troubleshooting
82+
83+
### "SDK location not found"
84+
- Make sure Android SDK is installed
85+
- Set ANDROID_HOME environment variable
86+
- Or create `local.properties` file with: `sdk.dir=/path/to/android/sdk`
87+
88+
### "Could not resolve dependencies"
89+
- Ensure you have internet connection
90+
- Gradle needs to download dependencies on first build
91+
- Try running: `./gradlew clean build`
92+
93+
### "Build failed"
94+
- Update Android Studio to latest version
95+
- Ensure you have Android SDK 34 installed
96+
- Check Java version: `java -version` (needs Java 8+)
97+
98+
### "App won't install on phone"
99+
- Enable "Install from Unknown Sources" or "Install Unknown Apps" in Settings
100+
- Make sure you're allowing installation from the file manager/browser you're using
101+
- Check if you have enough storage space
102+
103+
## What Gets Built
104+
105+
The build process creates:
106+
- **app-debug.apk** - Unsigned debug version (for testing/personal use)
107+
- File size: ~2-5 MB
108+
- Location: `app/build/outputs/apk/debug/app-debug.apk`
109+
110+
For a production release (not needed for personal use):
111+
- You would need to sign the APK with a keystore
112+
- Use: `./gradlew assembleRelease`
113+
114+
## Security Note
115+
116+
The debug APK is suitable for personal use. It's not signed for distribution on Google Play Store, but that's fine for installing on your own device.
117+
118+
## Estimated Time
119+
120+
- First time setup: 30-60 minutes (downloading Android Studio, SDK, etc.)
121+
- Subsequent builds: 2-5 minutes
122+
- APK transfer and install: 1-2 minutes
123+
124+
**Total time to working app on phone: 35-70 minutes** (most time is setup)
125+
126+
## After Installation
127+
128+
1. Launch "Voice Notes" app
129+
2. Tap "Allow" when asked for microphone permission
130+
3. Tap the big microphone button
131+
4. Speak your note
132+
5. Done! Your note appears with timestamp
133+
134+
Perfect for dictating notes while driving safely!

0 commit comments

Comments
 (0)