Skip to content

feat: add separate home screen shortcuts for VPN enable / disable#1109

Merged
arm64v8a merged 1 commit intoMatsuriDayo:refactor-start-stopfrom
Slava-Shchipunov:feat/add-on-off-shortcuts
Feb 2, 2026
Merged

feat: add separate home screen shortcuts for VPN enable / disable#1109
arm64v8a merged 1 commit intoMatsuriDayo:refactor-start-stopfrom
Slava-Shchipunov:feat/add-on-off-shortcuts

Conversation

@Slava-Shchipunov
Copy link

Description
This PR adds two new home screen shortcuts:

  • Enable VPN — always starts the VPN if it is stopped
  • Disable VPN — always stops the VPN if it is running

Previously there was only a toggle shortcut, which is not suitable for automation because the current VPN state must be known in advance.

With these separate shortcuts it becomes possible to reliably integrate NekoBoxForAndroid with automation tools such as Tasker, MacroDroid, Automate, or OEM automation systems (e.g. Samsung Modes & Routines).

Implementation details

  • Added QuickEnableShortcut and QuickDisableShortcut activities
  • Registered them in AndroidManifest.xml
  • Added new dynamic shortcuts in res/xml/shortcuts.xml
  • Added localized strings quick_enable and quick_disable

No existing behavior is changed; the original toggle shortcut remains available.

Testing
Tested on Samsung Galaxy S25 Ultra with Samsung Modes & Routines automation

For convenience, a test build from this fork is available here (self-signed, for testing only):
https://github.com/Slava-Shchipunov/NekoBoxForAndroid/releases/tag/1.4.1-20260115

@arm64v8a
Copy link
Contributor

arm64v8a commented Feb 2, 2026

I may be planning to refactor this part of the design, so I'll merge it into a separate branch for review later.

@arm64v8a arm64v8a changed the base branch from main to refactor-start-stop February 2, 2026 07:07
@arm64v8a arm64v8a merged commit c244459 into MatsuriDayo:refactor-start-stop Feb 2, 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