Skip to content

Fix Android boot, widget, and reconnect flows#48

Merged
anonvector merged 1 commit intoanonvector:mainfrom
yappologistic:fix/android-boot-widget-reconnect-flows
Mar 6, 2026
Merged

Fix Android boot, widget, and reconnect flows#48
anonvector merged 1 commit intoanonvector:mainfrom
yappologistic:fix/android-boot-widget-reconnect-flows

Conversation

@yappologistic
Copy link

Summary

  • move VPN widget toggling into a dedicated VpnWidgetToggleReceiver so widget providers only update UI and toggle handling runs through a single Hilt-enabled receiver
  • harden boot and reconnect startup paths by using goAsync(), ContextCompat.startForegroundService(...), and foreground-service pending intents where Android expects them
  • avoid repeated update checks after failures by saving the last-check timestamp before the network request, disable app backups, and pin Hilt to 2.57.1 to match the current project setup

Details

  • BootReceiver now handles only BOOT_COMPLETED, uses the application context, logs failures, and finishes its async work explicitly
  • both widget providers now route tap actions through VpnWidgetToggleReceiver, which reconnects/disconnects centrally and opens the app when VPN permission still needs user approval
  • reconnect notification actions now create service intents with PendingIntent.getForegroundService(...) on Android O+ so reconnect actions start reliably from notifications

Testing

  • ./gradlew :app:compileFullDebugKotlin --console=plain --no-daemon
  • ./gradlew :app:compileLiteDebugKotlin --console=plain --no-daemon

@anonvector anonvector merged commit d83d89a into anonvector:main Mar 6, 2026
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