Skip to content

Conversation

@Dan8Oren
Copy link
Owner

@Dan8Oren Dan8Oren commented Dec 4, 2025

🐛 Android 15+ Compliance & Permission Handling

1. Bug Fix: Android 15+ Foreground Service Crash 🚨

Bug: App crashed on Android 15+ when starting from boot (blocked Google Play publication)
Fix: Implemented WorkManager with 5-second delay to comply with foreground service restrictions
Files: Added BootServiceWorker.kt, updated BootCompletedReceiver.kt and MicLockService.kt

2. Bug Fix + New Feature: Permission Handling

Bug: App was stuck in a loop and unfunctional when no permission was given (both notifications or microphone)
Fix:

  • removed the notification permission checks as it's optional and not necessary for core logic.
  • Added state flags (isShowingPermissionDialog, hasRequestedNotificationPermission)
  • moved permission checks to onCreate() only
  • App now shows a dialog when permission is missing prompt the user to grant it and preventing the usage of the app.
    Files: MainActivity.kt

3. Modification due to changes: Quick Settings Tile Requires Notifications 🔔

Bug: Tile unusable without notification permission (should be optional)
Fix: Updated hasAllPerms() to only require microphone permission, tile now works without notifications
Files: MicLockTileService.kt

4. Bug Fix: MainActivity exits from recents after tile start

Bug: Reopening the app from recent apps caused an immediate exit after it was started via the Quick Settings tile
Fix: Updated startMicLockFromTileFallback to keep the activity open if the service is already running (not call finish()).

Implementation Details

  • WorkManager: Added androidx.work:work-runtime-ktx:2.9.0 dependency
  • Permission Separation: Microphone (required) vs Notifications (optional)
  • Improved UX: Clear dialogs, "Try Again" options, Settings deep-linking
  • State Management: Proper lifecycle handling to prevent loops and leaks

@Dan8Oren Dan8Oren merged commit 5cdf0aa into releases/version-1.1.2 Dec 4, 2025
2 checks passed
@Dan8Oren Dan8Oren deleted the bug-fixes branch December 4, 2025 07:51
Dan8Oren added a commit that referenced this pull request Dec 4, 2025
# 🐛  Android 15+ Compliance & Permission Handling

#### 1. Bug Fix: Android 15+ Foreground Service Crash 🚨

Bug: App crashed on Android 15+ when starting from boot (blocked Google
Play publication)
Fix: Implemented WorkManager with 5-second delay to comply with
foreground service restrictions
Files: Added BootServiceWorker.kt, updated BootCompletedReceiver.kt and
MicLockService.kt

#### 2. Bug Fix + New Feature:  Permission Handling

Bug: App was stuck in a loop and unfunctional when no permission was
given (both notifications or microphone)
Fix: 
- removed the notification permission checks as it's optional and not
necessary for core logic.
- Added state flags (isShowingPermissionDialog,
hasRequestedNotificationPermission)
  - moved permission checks to onCreate() only
- App now shows a dialog when permission is missing prompt the user to
grant it and preventing the usage of the app.
Files: MainActivity.kt

#### 3. Modification due to changes: Quick Settings Tile Requires
Notifications 🔔

Bug: Tile unusable without notification permission (should be optional)
Fix: Updated hasAllPerms() to only require microphone permission, tile
now works without notifications
Files: MicLockTileService.kt

#### 4. Bug Fix: MainActivity exits from recents after tile start

Bug: Reopening the app from recent apps caused an immediate exit after
it was started via the Quick Settings tile
Fix: Updated startMicLockFromTileFallback to keep the activity open if
the service is already running (not call `finish()`).

#### Implementation Details
 - WorkManager: Added androidx.work:work-runtime-ktx:2.9.0 dependency
- Permission Separation: Microphone (required) vs Notifications
(optional)
- Improved UX: Clear dialogs, "Try Again" options, Settings deep-linking
- State Management: Proper lifecycle handling to prevent loops and leaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants