Author Topic: QS Tasker script  (Read 44489 times)

Aqualung

  • Newbie
  • *
  • Posts: 27
QS Tasker script
« on: January 29, 2014, 01:00:10 PM »
Folks, somebody should design a Tasker script to bypass them pesky QS local prompts, hence allow for unattended remote control. Any volunteers? I do not think we should rely on TeamViewer to allow unattended access anytime soon.

Aqualung

  • Newbie
  • *
  • Posts: 27
Re: QS Tasker script
« Reply #1 on: February 03, 2014, 10:12:38 AM »
Alright, I wrote the Tasker scripts myself. Works like a charm! Welcome to unattended access!

whitedavidp

  • Newbie
  • *
  • Posts: 6
Re: QS Tasker script
« Reply #2 on: March 08, 2014, 06:36:42 PM »
Hello. I just stumbled across this thread and it is exactly what I want to do. Any chance you can post or email your solution? I don't yet own tasker but have been waiting for a reason to get it. This could be it. Thanks

Aqualung

  • Newbie
  • *
  • Posts: 27
Re: QS Tasker script
« Reply #3 on: March 08, 2014, 08:44:49 PM »
First you do a Tasker Load App (TVQS), and then use Tasker to simulate screen taps like so:

Profile: BypassTVQS#1
   Event: New Window [ Label:Allow remote support? Window Type:Dialog ]
Enter: Anon
   A1: Dpad [ Button:Right Repeat Times:2 ]
   A2: Dpad [ Button:Press Repeat Times:1 ]
   A3: Go Home [ Page:0 ]
Profile: BypassTVQS#2
   Event: New Window [ Label:Allow remote control? Window Type:Dialog ]
Enter: Anon
   A1: Dpad [ Button:Right Repeat Times:1 ]
   A2: Dpad [ Button:Press Repeat Times:1 ]
   A3: Go Home [ Page:0 ]

I know, not very elegant, but it does its job.

whitedavidp

  • Newbie
  • *
  • Posts: 6
Re: QS Tasker script
« Reply #4 on: March 08, 2014, 09:45:52 PM »
First you do a Tasker Load App (TVQS), and then use Tasker to simulate screen taps like so:

Profile: BypassTVQS#1
   Event: New Window [ Label:Allow remote support? Window Type:Dialog ]
Enter: Anon
   A1: Dpad [ Button:Right Repeat Times:2 ]
   A2: Dpad [ Button:Press Repeat Times:1 ]
   A3: Go Home [ Page:0 ]
Profile: BypassTVQS#2
   Event: New Window [ Label:Allow remote control? Window Type:Dialog ]
Enter: Anon
   A1: Dpad [ Button:Right Repeat Times:1 ]
   A2: Dpad [ Button:Press Repeat Times:1 ]
   A3: Go Home [ Page:0 ]

I know, not very elegant, but it does its job.

Aqualung my friend --
don't you start away uneasy
you poor old sod, you see, it's only me...

Thanks very much. I am all about not very elegant but doing the job. I just paid for Tasker and will try to get this going tomorrow. I hope to ultimately trigger the starting up (and bypassing) from a remote, desktop computer via ssh. I think I have found all the bits to cobble this together. Should be interesting. Your piece is critical. Cheers!

whitedavidp

  • Newbie
  • *
  • Posts: 6
Re: QS Tasker script
« Reply #5 on: March 09, 2014, 05:49:43 PM »
First you do a Tasker Load App (TVQS), and then use Tasker to simulate screen taps like so:

Profile: BypassTVQS#1
   Event: New Window [ Label:Allow remote support? Window Type:Dialog ]
Enter: Anon
   A1: Dpad [ Button:Right Repeat Times:2 ]
   A2: Dpad [ Button:Press Repeat Times:1 ]
   A3: Go Home [ Page:0 ]
Profile: BypassTVQS#2
   Event: New Window [ Label:Allow remote control? Window Type:Dialog ]
Enter: Anon
   A1: Dpad [ Button:Right Repeat Times:1 ]
   A2: Dpad [ Button:Press Repeat Times:1 ]
   A3: Go Home [ Page:0 ]

I know, not very elegant, but it does its job.

Thank you, thank you, thank you!

With a bit of fiddling, I now have this working as I want. I did have to change the repeat times on Bypass2 from 1 to 2 on action 1.

I also lost alot of time fiddling with an old Tasker Proxy app that no longer seems to work. Finally, I stumbled into this:

/system/bin/am broadcast -a net.dinglisch.android.tasker.ACTION_TASK -e task_name <your task>

I am able to execute this from my desktop PC to launch TVQS via tasker using SSH. When I connect via TV on my PC, your tasker stuff works perfectly! Wow!

So thanks!

n3wb13

  • Newbie
  • *
  • Posts: 1
Re: QS Tasker script
« Reply #6 on: March 23, 2014, 10:26:35 AM »
Thank you Aqualung so much for your script.

On my phone which is running JellyBean, the script works just fine.

But it seems not working on my Nexus 7 II (KitKat) as the second profile BypassTVQS#2 goes straight to the Deny button. I tried to set the number of right button press to 2 and Tasker did select the Allow button. However, I still got a reject message.

I'm wondering if anyone has the same problem or not?
« Last Edit: March 23, 2014, 10:29:01 AM by n3wb13 »

drakongetes

  • Newbie
  • *
  • Posts: 1
Re: QS Tasker script
« Reply #7 on: June 02, 2014, 03:52:57 PM »
hello whitedavidp,

thank you for your script - this is exactly what I am trying to do.
However, I am a bit out of my depth as how to implement your script!

I intalled Tasker.
Under Profile, I have a Device Boot option (which is ON) and then
device Boot -> Option Apps.

If I click on Option Apps, I have
1. Wait 20 seconds
2. Lauch App
  App TV QuickSupport.

So basically when I reboot my phone, TV QS starts automatically, which is great.

But from here I am stuck.

How do I implement your script?
- Do I add it under the 2 taskes I have above? If so, how???
When I add a task, I cannot find an Event called "New Window"

Alternatively, if I try to selection an Script action, I can choose:
JavaScript, JavaScripted, Run Shell, Run SL4A Script
Which one do I choose?

Thanks A LOT in advance for your help.

whitedavidp

  • Newbie
  • *
  • Posts: 6
Re: QS Tasker script
« Reply #8 on: June 02, 2014, 04:13:43 PM »
hello whitedavidp,

thank you for your script - this is exactly what I am trying to do.
However, I am a bit out of my depth as how to implement your script!

I intalled Tasker.
Under Profile, I have a Device Boot option (which is ON) and then
device Boot -> Option Apps.

If I click on Option Apps, I have
1. Wait 20 seconds
2. Lauch App
  App TV QuickSupport.

So basically when I reboot my phone, TV QS starts automatically, which is great.

But from here I am stuck.

How do I implement your script?
- Do I add it under the 2 taskes I have above? If so, how???
When I add a task, I cannot find an Event called "New Window"

Alternatively, if I try to selection an Script action, I can choose:
JavaScript, JavaScripted, Run Shell, Run SL4A Script
Which one do I choose?

Thanks A LOT in advance for your help.


Well, I am mostly copying the work of others who have gone before me. But let me see if I can help...

First, you need to enable something called Tasker's Accessibility service. Look under settings->Accessibility->Services for something that says Tasker. Turn that on. This is needed so Tasker can read information that is shown in popup windows from TVQS. (Note that this causes problems on at least some Samsung phones including my Note I. It causes the thing to incorrectly read all sorts of stuff aloud. There is no fix for that so I do not use this on my phone - only on my TV computer where it works fine.)

Then create a new Task - call it Bypass TVQS. Step 1 = Dpad (under input). Set Button to Right and Repeat = 2. Step 2 = Dpad. Set Button to Press and Repeat = 1. Step 3 = Go Home (under App). Set Page = 0 (however I need to use 2 on my TV computer so you may have to fool with this. But 0 should take you to you main home screen).

Then create a new profile that is triggered by a New Window event (under UI). For Label put in Allow remote control?, select Window Type = Dialog, Priority Highest. Associate this even with the Bypass TVQS task created above.

I generally seem to have to exit Tasker, remove it from the Android task list, and restart Tasker to get it to read in my changes properly. Not sure why. But after doing this, you should be able to start TV on a PC and connect to TVQS (which is already started on your device at boot - I don't do this myself - I trigger it by sending the device an SSH command but that is another story). When you connect, Tasker should see the new popup Window from TVQS that says Allow remote control? When Tasker sees this it should trigger your Bypass TVQS task which should press the Allow button and then show your main home screen.

Good luck.

whitehathacker

  • Newbie
  • *
  • Posts: 3
Re: QS Tasker script
« Reply #9 on: June 07, 2014, 01:14:49 AM »
Super Newbie here...this is what I am looking for as well but a few questions.

From the google playstore what tasker app do I download onto my android? I know it sounds like a stupid question!

whitedavidp

  • Newbie
  • *
  • Posts: 6
Re: QS Tasker script
« Reply #10 on: June 07, 2014, 05:42:41 PM »
Super Newbie here...this is what I am looking for as well but a few questions.

From the google playstore what tasker app do I download onto my android? I know it sounds like a stupid question!

Here it is: https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm.

whitehathacker

  • Newbie
  • *
  • Posts: 3
Re: QS Tasker script
« Reply #11 on: June 09, 2014, 03:11:42 PM »
I'm trying to use the same script on a Samsung note 10.1 (2014 edition) and the input screen tells me that 'dpad' is not available on this device? Anyone else see this?

whitedavidp

  • Newbie
  • *
  • Posts: 6
Re: QS Tasker script
« Reply #12 on: June 09, 2014, 03:34:25 PM »
I'm trying to use the same script on a Samsung note 10.1 (2014 edition) and the input screen tells me that 'dpad' is not available on this device? Anyone else see this?

I think you should check about this on the Tasker Support forum https://groups.google.com/forum/#!forum/tasker. I did a quick google and found a posting that says dpad requires a rooted device https://groups.google.com/forum/#!topic/tasker/S2ZoulP8Urc. I cannot say for sure but all of my devices are rooted.

zetsui

  • Newbie
  • *
  • Posts: 5
Re: QS Tasker script
« Reply #13 on: February 03, 2015, 12:57:05 AM »
This thread has over 5k  views. Could someone upload the tasker scripts? The directions here are a little difficult to follow

zetsui

  • Newbie
  • *
  • Posts: 5
Re: QS Tasker script
« Reply #14 on: February 03, 2015, 02:12:17 AM »

Edit: got it to work with the above confirguration, by restarting tasker a few times. Hits yes on both pop up dialogs. The thing is though I need the teamviewer android window in the foreground (in front) for it to automate the service. Everytime I log out of the android on my computer, I have to walk over to my charging android tablet and open up the teamviewer file myself to bring it to the foreground so it can auto-load it's teamviewer id in the id box...is there a way I can have tasker call it to the foreground whenever the android is idle (most of the time- almost like a constant android server for my laptop)?

 

anything