• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Task not ran when plugging USB

Winfried

Well-Known Member
Oct 11, 2011
132
16
s/ran/run/

Hello,

I just installed the 5.1 trialware on a phone running Android 7.

I'm onlly getting started, so it could be something obvious.

I expect Tasker to enable wifi when I plug the USB cable, but nothing happens, although the task does run if I run it manually.

Tasker.enable.wifi.when.plugging.USB.png

Any idea what it could be?

Thank you.
 
Last edited:
Need tri see your profile ...
Long press on profile until it is highlighted
Select three dots
Select Export
Select Description To Clipboard
Paste it into a message here

There is a fairly long learning curve for Tasker. The approach that works is to start out simple ... get it to work ... tweak it ... get it to work.

A task like the following is very useful as a starting point ...

Beep (535)
A1: Beep [ Frequency:8000 Duration:1000 Amplitude:50 Stream:3 ]

... Thom
 
Upvote 0
Thanks.

I did try this before asking, but there's nothing obvious after long-pressing the profile:

Tasker.enable.wifi.when.plugging.USB.2.png


The task is run when playing it manually, ie. Tasker does enable wifi.

Again: This is the trialware installed manually though adb. Could it be some install issue?

Or could it be the wrong event to trigger the task?
 
Upvote 0
Elsewhere, I'm told:

"I have profile State -> Hardware -> USB Connected.

Help for this option states "Due to limitations of the Android USB interface, successful detection of USB connections is extremely dependent on the hardware of both the host and USB device.""

Thankfully, I didn't waste more time on this.

Thank you.
 
Upvote 0
I could not get it to detect the USB connection.

For future reference ...
Long press on the Profile name until it is highlighted
Select three dots
Select Export
Select Description To Clipboard
Paste it into a message here

Something like ...

Profile: Test (570)
State: USB Connected [ Class:Any ]
Enter: Anon (571)
A1: Beep [ Frequency:8000 Duration:1000 Amplitude:50 Stream:3 ]

The trigger you are using is a state and not an event. It will run continuously if it ever runs.

I have to ask ... why do you want to enable WiFi when you connect a USB cable? I have a profile that enables WiFi when within range of one of my routers.

... Thom
 
Last edited:
Upvote 0
I don't know what you are running.

If you go to three dots | Preferences | UI is Beginner Mode turned on?

With regards to steep ... if the hardware did support it your trigger would result in the task being run continuously.

What is "Enable WiFi"? Is this the name of a Task that you created?

This is what I have ...

Profile: Test (570)
State: USB Connected [ Class:Any ]
Enter: Anon (571)
A1: WiFi [ Set:On ]

... Thom
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones