Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,21 @@ A clear and concise description of what actually happened.
- [ ] Tried switching between MediaRecorder/AudioRecord modes
- [ ] Checked battery optimization settings

**Logs (if available)**
If you can access Android logs (via ADB or developer options), please include any relevant error messages:
**Debug Logs** 🔍
To help us diagnose your issue faster, please consider capturing debug logs:

1. **In the app**: Tap the menu (⋮) → "Debug Tools"
2. **Reproduce the issue**: Use the app normally while the bug occurs
3. **Stop recording**: Tap menu (⋮) → "Stop & Share Debug Logs"
4. **Attach the file**: The app will create a zip file in Downloads/miclock_logs folder

**Why debug logs are helpful:**
- Contains app logs, system audio state, and device information
- Especially useful for device-specific or hard-to-reproduce issues
- Helps identify audio routing problems unique to your device model
- **Privacy-safe**: Only captures MicLock logs (no call audio, contacts, or personal data)

**If you can't use the in-app tool**, you can also provide logs via ADB:
```
Paste logs here
```
Expand Down
39 changes: 38 additions & 1 deletion DEV_SPECS.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,44 @@ Mic-Lock must implement configurable delayed activation to optimize battery usag
* **Battery Usage Awareness:** Clearly communicate to users that MediaRecorder mode uses more battery but provides better compatibility.
* **Battery Optimization Exemption:** Upon first launch, the app prompts the user to grant an exemption from battery optimizations. This is critical to prevent the Android system from terminating the service during long periods of device inactivity, ensuring continuous background operation.

### 2.9 Service Resilience and User Experience
### 2.9 Debug Logging and Diagnostics

To facilitate troubleshooting of audio routing issues, Mic-Lock provides comprehensive debug logging capabilities:

* **On-Demand Recording:** Users can start debug log recording through the overflow menu (⋮) → "Debug Tools"
* **Automatic Safety Mechanisms:**
- 30-minute auto-stop to prevent battery drain and storage exhaustion
- Automatic cleanup of temporary files when app closes
- Visual recording indicator with elapsed time counter
* **Comprehensive Data Collection:**
- Application logs (logcat filtered to Mic-Lock process only)
- System audio state (dumpsys audio, telecom, media.session, media.audio_policy, media.audio_flinger)
- Device metadata (manufacturer, model, Android version, app version)
- Service state at time of collection
* **Privacy-Conscious Design:**
- Only captures Mic-Lock app logs (no other app data)
- No call audio content, contacts, phone numbers, or location data
- Explicit user action required to share logs
* **Persistent Storage:**
- Logs saved to Downloads/miclock_logs folder with timestamped filenames
- Files persist after app uninstall for later reference
- Notification with "Share" action for easy log distribution
* **Graceful Error Handling:**
- Continues collection even if some components fail
- Provides context about which failures are relevant to specific issues
- Clear error messages guide users on next steps
* **Crash Detection and Recovery:**
- Automatically saves debug logs if app crashes during recording
- Shows notification with crash log location
- On next launch, offers to report crash on GitHub with pre-filled issue template
- Crash logs include exception details and stack traces
* **User-Friendly Sharing:**
- Standard Android share sheet integration
- Direct GitHub issue creation with pre-filled crash reports
- Feedback mechanism for bug reports and feature requests
- About screen with app information and repository link

### 2.10 Service Resilience and User Experience

To ensure the service remains active and is easy to manage, Mic-Lock implements several resilience features:

Expand Down
5 changes: 3 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ android {
applicationId = "io.github.miclock"
minSdk = 24
targetSdk = 36
versionCode = 5
versionName = "1.1.1"
versionCode = 9
versionName = "1.1.2"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -59,6 +59,7 @@ dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.material)
implementation(libs.androidx.work.runtime.ktx)

// Unit testing dependencies
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
Expand Down
Loading