>
> I'm not sure whether this is a hardware or a software issue, but I'm willing to try something/anything after many hours of searching and tinkering.
>
Could you turn on and check the run log(menu / more / runlog) then post the relevant part of the log along with the exported profile description.
To post your profile or task here... Long press on the profile or task name / ( 3 dot menu with 4.0+ ) export / export "DESCRIPTION" to clipboard (not XML)
Any linked tasks will be exported with the profile they are linked to..
To be able to export, The beginner mode needs to be off and the profile needs to be named by you (Not the Tasker listed name. Tasker will list your profile with the context name if you have not given it one).
20160816 22.15.30 M Restart ID0:0.0 Monitor
20160816 22.15.34 P Active ID2 DAC Connected
20160816 22.15.34 E Start ID0:0.0 TaskService
20160816 22.15.34 T Running ID3 Play
20160816 22.15.34 A OK ID3.1 Play.Media Control
20160816 22.15.34 T ExitOK ID3 Play
20160816 22.15.34 E Stop ID0:0.0 TaskService
20160816 22.16.01 P Inactive ID2 DAC Connected
For the life of me, I couldn't get the Profile exported. But, below is the Task export. There's only one Profile: "DAC Connected" and "Play" is the only Task. Thank you for your help.
Play (3)
A1: Media Control [ Cmd:Play [Simulated Only] Simulate Media Button:On App:Play Music ]
>
> I think this is it. As visible below, the Profile "DAC Connected" activates at 22.15.34 when I plug in the DAC. I unplugged the DAC five seconds later, which stops music playing, but the Profile doesn't go Inactive until 30 seconds later when I lock/unlock the screen.
>
We should start with the basics. Try all the relevant suggestions here.
http://tasker.dinglisch.net/userguide/en/androidpowermanagement.html
>
>
> For the life of me, I couldn't get the Profile exported.
Make sure you have given the profile a user name.
> Anything else I could try? Thank you.
You could try a additional context with a state / hardware / usb: media. Then select the invert option to see if will detect it that way.
> You could try a additional context
I meant try a additional profile with a context of state / hardware / usb: media. Then select the invert option to see if will detect it that way.
> I have tried inverting the profile. It acts as expected. The unplug event recognized only after screen lock/unlock.
>
> I also tried a USB mouse. Plugging/unplugging events are recognized within seconds, repeatedly. For some reason, I'm having trouble getting Tasker to recognize the USB DAC being unplugged.
>
> Android knows it is being unplugged just fine: music pauses immediately when the DAC is unplugged. Tasker doesn't, not until screen is locked/unlocked.
>
> --
That does sound like A bug. I do not have the correct cable to confirm it happens across multiple devices. You could try emailing the developer directly at sup...@apps.dinglisch.net . Be sure to send a link to this discussion.
Rich..