Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tasker integrations #591

Merged
merged 6 commits into from
Aug 6, 2024
Merged

Conversation

zacharee
Copy link
Contributor

I have a use-case for VPN Hotspot that requires enabling USB tethering automatically when USB is connected. I can't use the developer option to have my default USB configuration be USB tethering, since my plan has no hotspot support at all. I did try using Tasker to enable USB tethering manually, but wasn't really getting anywhere. VPN Hotspot would show it being active but no traffic would be passed.

Since I've seen some other requests for automation, and it comes in handy for me, I decided to add Tasker Plugin support to VPN Hotspot. These are the features I implemented:

Actions

  • Enable/disable Wifi Tethering.
  • Enable/disable USB Tethering.
  • Enable/disable Ethernet Tethering.
  • Enable/disable Bluetooth Tethering.

Using the configuration button in Tasker will toggle whether the action will enable or disable tethering. This isn't the best UI, but I think it might be preferable to implementing a new Activity just to show a single toggle. I'm definitely open to other opinions.

State Actions

  • Get current tethering state as an object with boolean fields:
    • %wifi
    • %usb
    • %ethernet
    • %bluetooth

State Events

  • Current tethering state as an object with the same fields as above.

@zacharee zacharee force-pushed the add-tasker-integration branch 11 times, most recently from b3f795a to 0373f82 Compare July 22, 2024 21:28
@Mygod
Copy link
Owner

Mygod commented Jul 24, 2024

Hi thanks for the PR! I will definitely take a closer look later.

@Mygod Mygod self-assigned this Jul 26, 2024
@Mygod
Copy link
Owner

Mygod commented Aug 6, 2024

I'll take over and fix the rest. Thanks! Please don't force push again. :)

Copy link
Owner

@Mygod Mygod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi this is ready to be merged. Let me know.

@zacharee
Copy link
Contributor Author

zacharee commented Aug 6, 2024

Just made a change to remove the TetheringStateInput class since the data is coming directly from the static set you added instead.

@zacharee
Copy link
Contributor Author

zacharee commented Aug 6, 2024

I can't merge this myself since I don't have write access.

@Mygod Mygod merged commit c01cee6 into Mygod:master Aug 6, 2024
2 checks passed
@Mygod
Copy link
Owner

Mygod commented Aug 6, 2024

This PR is now merged. It will go into the next beta release (v2.18.0). Thanks again!

@Mygod Mygod mentioned this pull request Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants