Touch Emulation with Tasker App - Android Q&A, Help & Troubleshooting

Hello,
I was hoping someone could help.
http://gyazo.com/ea214e3f5b376fc650ce4589c2551fdb
this format for input in tasker shell, produces nothing.
I want to be able to send taps
as for errors I get none when i use this format.
Thanks,
Daveyman123

Within Tasker I can get to the point of creating apps that use keypresses
However touch emulation has been frustrating to figure out so far.
DM123

You want your Tasker "app" to emulate screen/button presses? That'll require root. You can use the `input` program from the shell (I wrote this script a while back for something a bit similar; it uses `sendevent` instead of `input`, though, something you don't want to do manually).

i've been using shell/input tap and input swipe. so far its been working for me.

You seem to have captured my problem pretty well.
So capturing the sendevents and getevents truly is the way?
Is there a simpler way to emulate touch using tasker?
-DM123

daveyman123 said:
You seem to have captured my problem pretty well.
So capturing the sendevents and getevents truly is the way?
Is there a simpler way to emulate touch using tasker?
-DM123
Click to expand...
Click to collapse
Using `input` is simpler. Its help message should be pretty self explanatory.

GermainZ said:
Using `input` is simpler. Its help message should be pretty self explanatory.
Click to expand...
Click to collapse
This is what im looking at
http://gyazo.com/bf8a2c58a10a5762f18580a777610cd0
I need to capture sendevent and getevent to get coordinates correct?
Please and Thanks,
DM123

daveyman123 said:
This is what im looking at
http://gyazo.com/bf8a2c58a10a5762f18580a777610cd0
I need to capture sendevent and getevent to get coordinates correct?
Please and Thanks,
DM123
Click to expand...
Click to collapse
You could, but I'd really just use `input` and make my life easier… Use a terminal emulator (or adb shell) to test it.

GermainZ said:
You could, but I'd really just use `input` and make my life easier… Use a terminal emulator (or adb shell) to test it.
Click to expand...
Click to collapse
I have limited understanding of terminal emulators. But as for my past experience i never could emulate taps in Bluestacks.
Thanks for the help so far GermanZ,
DM123

jin5 said:
i've been using shell/input tap and input swipe. so far its been working for me.
Click to expand...
Click to collapse
You are having to give the coordinates of the input, right?
DM123

daveyman123 said:
I have limited understanding of terminal emulators. But as for my past experience i never could emulate taps in Bluestacks.
Thanks for the help so far GermanZ,
DM123
Click to expand...
Click to collapse
Install a terminal emulator app (e.g. this) and open it. Once that's done, type "su" (to start a root shell), hit enter, type "input" and hit enter again. This will show you the help output for the `input` program, which you can use to simulate taps.

daveyman123 said:
You are having to give the coordinates of the input, right?
DM123
Click to expand...
Click to collapse
yup that's right

Are there generic, say maybe the middle of the screen, input coordinates i could test.
Or is every bluestacks going to have very different coordinates?
Thank you
DM123

daveyman123 said:
Or is every bluestacks going to have very different coordinates?
Click to expand...
Click to collapse
Correct. There might be a way to get the screen's resolution from the Android shell (with the default utilities) then use that, but I'm not sure.

GermainZ said:
Install a terminal emulator app (e.g. this) and open it. Once that's done, type "su" (to start a root shell), hit enter, type "input" and hit enter again. This will show you the help output for the `input` program, which you can use to simulate taps.
Click to expand...
Click to collapse
After doing this I remember more clearly wrestling with this back in July.
My problem is that no matter what format I seem to use "tap <x> <y> for example, the result is no taps occur
This shows what i just tried to input
http://gyazo.com/ea214e3f5b376fc650ce4589c2551fdb

daveyman123 said:
After doing this I remember more clearly wrestling with this back in July.
My problem is that no matter what format I seem to use "tap <x> <y> for example, the result is no taps occur
This shows what i just tried to input
http://gyazo.com/ea214e3f5b376fc650ce4589c2551fdb
Click to expand...
Click to collapse
Don't use Tasker for testing shell commands. You won't see errors and it's a pain. Use a terminal emulator instead.
Usually, "<x>" implies you shouldn't include the brackets. In other words, your example should read "input tap 333 333", not "input tap <333> <333>"

GermainZ said:
Don't use Tasker for testing shell commands. You won't see errors and it's a pain. Use a terminal emulator instead.
Usually, "<x>" implies you shouldn't include the brackets. In other words, your example should read "input tap 333 333", not "input tap <333> <333>"
Click to expand...
Click to collapse
ah the fact that it returned no errors was tripping me up i think.
Now i need to get exact coordinates
Thanks again GermainZ!
I know there are developer tools for getting coordinates but i cant seem to find them in this bluestacks
-DM123

Related

Spb Mobile Shell 2 - Contacts App Replacement Version 0.01

I made an easy way of replacing the SPB Contacts app in Mobile Shell 2 with your own prefered application. Once you create a shortcut you can switch between the default Mobile Shell Contacts and any application of your choosing.
I made it as simple as possible to add your prefered Contacts Manager, I use Finger Friendly, my friend uses iContact, and PocketCM seems quite popular here. As downloaded, the script is setup for Finger-Friendly Friends, but to change it all you have to do is edit the first 2 lines with a text editor.
For use with SPB Mobile Shell 2 only, for Windows Mobile support see this thread.
MortScript is requied, download it here.
I hope you find this useful!
To use:
1. Download and unpack the ZIP file.
2. Edit the first 2 lines in the MSCR file, notepad works fine for this.
set AltContactName, "Finger Friendly Friends"
set AltContactPath, "\Program Files\Finger-Friendly Friends\FingerFriendlyFriends.exe"
3. Copy to your device, and make a shortcut in the Mobile Shell Launcher (I placed it in "TOOLS")
4. Click the shortcut and answer the "Yes or No" question.
5. Repeat step 4 to swap between the two contact managers!
Nice, was looking for something like this. Using it with PocketCM and works great
Works great, also use it with PocketCM
MFx said:
Works great, also use it with PocketCM
Click to expand...
Click to collapse
+1 thank's
how to edit the registry to let the speedy dial icon on the bar... launch the pocket cm contacts .exe
Out of curiosity, what is the reg edit to change the contacts exe? I can't seem to find it. Thanks.
Thank you very much for your nice script. It's very useful for me.
MFx said:
Works great, also use it with PocketCM
Click to expand...
Click to collapse
what's the exact command to get it to work with pocketcm?
this is what i tried:
Code:
set AltContactName, "Pocket CM"
set AltContactPath, "\Program Files\PocketCM\PocketCM.exe"
and it didn't work.
thanks!
I have been using 3 speed dial pages for a while and have decided I don't like it anymore...
Instead I'd like the contacts tab button to start my default contact manager - Pocket Informant - since it easier to read, finger friendly, and uses categories. Will this ever be possible you think?
OnceAMatrixMan said:
I have been using 3 speed dial pages for a while and have decided I don't like it anymore...
Instead I'd like the contacts tab button to start my default contact manager - Pocket Informant - since it easier to read, finger friendly, and uses categories. Will this ever be possible you think?
Click to expand...
Click to collapse
Unfortunately this is not possible, yet, this would take a major hack of the shell program itself.
TheSeanTeam said:
what's the exact command to get it to work with pocketcm?
this is what i tried:
Code:
set AltContactName, "Pocket CM"
set AltContactPath, "\Program Files\PocketCM\PocketCM.exe"
and it didn't work.
thanks!
Click to expand...
Click to collapse
I'm not sure what that actual path should be, as I don't use pocket CM, but please verify your path.
If the scripting does not work on your device, I appologize, it is possible your registry varies from the common windows mobile settings, and is appearently device specific.
This one works great. ANyone know where I can get the black theme like this one?
JukEboXAuDiO said:
This one works great. ANyone know where I can get the black theme like this one?
Click to expand...
Click to collapse
JFC, try the thread or website related to that program!
SMS App replacement
Sorry,
but you can create a script to replace the basic program for SMS (in SPB mobile shell 2.1) with another one? (VITO SMS-chat)
Congratulations on your work
Thank you
flane said:
Sorry,
but you can create a script to replace the basic program for SMS (in SPB mobile shell 2.1) with another one? (VITO SMS-chat)
Congratulations on your work
Thank you
Click to expand...
Click to collapse
I have reserched this and determined that changining "NOW" screen links is not possible at this time, you could create short cuts in the customizable "My Menu" though.
Hey NiteStalker, great script! Works perfect.
Would you (or anyone) know of a way to use MortScript to have the Mobile Shell email icon open up a different app (Flexmail in this case)?
Thanks again.
kwickone said:
Hey NiteStalker, great script! Works perfect.
Would you (or anyone) know of a way to use MortScript to have the Mobile Shell email icon open up a different app (Flexmail in this case)?
Thanks again.
Click to expand...
Click to collapse
NOW SCREEN support is not currently possible, as this would require a major hack of the Shell Program itself, I am not skilled in that and it would most likely violate licensing anyway. I have searched the registry, and disected the "XML" files, and determined "Now Screen" support will not become available with the the current version of Shell. My appologies.
Works flawlessly with MS 2.1. Just the thing I was looking for, thanks!
Which folder do you copy this file to?
I made a shortcut to the file in Tools but nothing happens?
dvd107 said:
Which folder do you copy this file to?
I made a shortcut to the file in Tools but nothing happens?
Click to expand...
Click to collapse
You can run it from any folder you want, just make sure you've installed mortscript first.

Best ssh/telnet app for docked Prime?

Anyone know of a good ssh/telnet app that works properly with the keyboard dock on the Prime?
I have tried ConnectBot but the shift-number keys don't work, as well as other keys on the keyboard.
Telnet isn't as important as ssh, so an ssh only app would be good.
Willing to pay a few quid/dollars/euros/camels too.
V3ng said:
Anyone know of a good ssh/telnet app that works properly with the keyboard dock on the Prime?
I have tried ConnectBot but the shift-number keys don't work, as well as other keys on the keyboard.
Telnet isn't as important as ssh, so an ssh only app would be good.
Willing to pay a few quid/dollars/euros/camels too.
Click to expand...
Click to collapse
I'm using a custom apk for connectbot that can be found here : http://code.google.com/p/connectbot/wiki/KeyboardShortcuts
Look at the comments, there's two links from two different guys and it works perfectly with the dock!
V3ng said:
Anyone know of a good ssh/telnet app that works properly with the keyboard dock on the Prime?
I have tried ConnectBot but the shift-number keys don't work, as well as other keys on the keyboard.
Telnet isn't as important as ssh, so an ssh only app would be good.
Willing to pay a few quid/dollars/euros/camels too.
Click to expand...
Click to collapse
Better Terminal Emulator Pro is worth a look, although I am also going to check out the connectbot mentioned above.
BTEP does not support encrypted keys which is a big problem for me
-Barry
That custom apk is great thanks Anthony.
Do you know if you can disable the function key thing so I can enter a "!" ?
Indeed, thank you for the keyboard-capable APK.
My only gripe is that connectbot won't SSH1, which is necessary for my situation.
I agree, btep is the next best solution after connectbot.
anthonyalberto said:
I'm using a custom apk for connectbot that can be found here : http://code.google.com/p/connectbot/wiki/KeyboardShortcuts
Look at the comments, there's two links from two different guys and it works perfectly with the dock!
Click to expand...
Click to collapse
Thanks for this, even better than the BTEP I have been using, and free to boot!
I still can't get the "!" key working, which I need for vi!
Any ideas?
That's weird, I have no issue using the ! symbol
Maybe try to go to settings, Directory shortcutcs => Use right side keys, that's the only thing I can think of
I use BTEP for the dock support, although I guess Terminal Emulator can do that well enough now. BTEP like many apps, uses Dropbear for SSH: which is good but kinda limited.
I generally use OpenSSH in a Debian chroot, running in BTEP+tmux; tmux is a program like gnu screen.
Sent from my Transformer Prime TF201 using Tapatalk
Resurrecting a dead thread....
Sorry for ressurecting, but after going through the ringer on exactly this, had to comment.
Home/end keys don't work in nano/vi for BTEP. Commented this in the existing BTEP bug for TPrime keyboards: http://littlegreenbugs.com/bugs/view/165/
BTEP also doesn't properly do screen wipes in curses applications. Again, see here: http://littlegreenbugs.com/bugs/view/191/
Connectbot standard has effectively no support for the hardware keyboard.
vxconnectbot works awesome, as long as all your modifier keys (shift, ctrl, etc.) aren't pressed at the same time as the keys. Press, release, then press+release the key to modify. Not at all like a real keyboard.
irssi connectbot actually supports the keyboard, which is incredible. There's some other (rendering) issues with irssi connectbot, but compared to the others it's even better support than BTEP. Note, this doesn't actually run irssi, it adds support for actually using things like your modifier keys from a hardware keyboard, so that you could use irssi if you want to. Thus the name.
ConnectBot
I am still a fan of using the modified ConnectBot, it is just sadly really quite ridiculous to find... Best working version I have found is from http://code.google.com/p/connectbot/issues/detail?id=459#c72. In comment #72 4WayneD links to a ConnectBot-debug.apk on his website. I have been using this modified version on the Prime for a couple months now. Things I have checked myself:
* Number keys work correctly
* Ctrl keys work (this was key for me as I use screen a *LOT*)
* Search key functions as Alt
* Home/End/PgUp/PgDn keys work
Another thing to note, this is a modified older version as I do not like the new "tablet" version of ConnectBot as it sacrifices way too much screen real estate.
I like Terminal IDE, works fine with the dock.
Sent from my i9250

[Q]Get hardware-key-event while in background

Ever since I got my Droid 3 I wanted to be able to control games using the keypad, but sadly most games won't support it, so I figured, it would be cool if I could make an app that catches all the keyboard events and triggers fake MotionEvents for preset regions of the touchscreen (kindof how it's done on the iControlPad).
I believe I've found a way to fake the touches, but when searching for a way to read keyboard events when my app doesn't have the focus all lead to dead ends.
Does anybody have a clue how I could do that?
If anyone cares: I not only managed to find a way to read out all the touches and keystrokes that should go to other apps (though some android-coworker said it was impossible), but I can also filter which one of those I let through. I can even block the back- and home-buttons. And it's runnable without any running service or activity, so invisible and unkillable. I don't need most of that for my app, so I won't use what I don't need, I just stumbled across it by accident.
Every threat on this topic ended with "It's impossible to read out keystrokes destined to another app, because it would be too much of a security issue." Well, it is possible.
Sent from my XT860 using xda app-developers app
Dakkaron said:
If anyone cares: I not only managed to find a way to read out all the touches and keystrokes that should go to other apps (though some android-coworker said it was impossible), but I can also filter which one of those I let through. I can even block the back- and home-buttons. And it's runnable without any running service or activity, so invisible and unkillable. I don't need most of that for my app, so I won't use what I don't need, I just stumbled across it by accident.
Every threat on this topic ended with "It's impossible to read out keystrokes destined to another app, because it would be too much of a security issue." Well, it is possible.
Sent from my XT860 using xda app-developers app
Click to expand...
Click to collapse
I do care! I would appriciate to hear how this works, because I would need it for my ongoing development.
Besides Camara button, which is of cause easy due to the broadcast event, and the volume keys (which are more tricky, since you have to inject an own BroadcastReceiver to the AudioManager), how do you handle other keys?
Ok, it's been a while since I did this, and I had a lot of work on other projects in between so, I hope I get everything right.
To do the whole trick you need root access.
1) Get the android.permission.SYSTEM_ALERT_WINDOW permission
2) Open up a system alert window with no content. There is a setting somewhere that lets you catch all keystrokes and touches. This blocks them all from going through
3) This one is tricky. I had to analyse nonsense for days to get it right, and I fear it's still not very good. Go to /dev/input on your phone. There are files named event1, event2, ...
Each of those correspond to one input device, so one is your touchscreen, one is the keyboard and so on. What you do now is you perform the action you want to recreate on the phone (e.g. press a key) and monitor the event files through adb (there is a linux command, that I forgot, that lets you view a file in real time. Also you can copy that real time view to your harddrive by typing "adb shell [command] > record.txt").
Once you know every event that you want to recreate, you can go to the next step.
4) This is what your app has to do to let a keystroke through: The user presses a key, your app catches it. Then it changes it's mode (see 2) ) to not catch any keystrokes at all, posts the corresponding event for that key in the fitting /dev/input/eventX-file, and sets itself to catch keystrokes again.
Before the whole thing make sure, your /dev/input/eventX-file has a chmod of 666 or therelike, since you can't write into it from your app. You only need root for that, after that you don't need root. The OS resets the chmod on each reboot.
It is a hell of a lot of work. Calculate about a week or more for just that (at least that was what it took me to figure it all out). Good luck
PS: If you get your app system privileges, there is also the android.permission.INJECT_EVENTS, which allows you to inject key- and touch-events to another app using a simple function (can't remember it, but Google does). For your app to be able to get system privileges you need to copy it to /system/app, which requires root and a mounted /system. Catching the keystrokes still works the same way as above.
Dakkaron said:
Ok, it's been a while since I did this, and I had a lot of work on other projects in between so, I hope I get everything right.
To do the whole trick you need root access.
1) Get the android.permission.SYSTEM_ALERT_WINDOW permission
2) Open up a system alert window with no content. There is a setting somewhere that lets you catch all keystrokes and touches. This blocks them all from going through
3) This one is tricky. I had to analyse nonsense for days to get it right, and I fear it's still not very good. Go to /dev/input on your phone. There are files named event1, event2, ...
Each of those correspond to one input device, so one is your touchscreen, one is the keyboard and so on. What you do now is you perform the action you want to recreate on the phone (e.g. press a key) and monitor the event files through adb (there is a linux command, that I forgot, that lets you view a file in real time. Also you can copy that real time view to your harddrive by typing "adb shell [command] > record.txt").
Once you know every event that you want to recreate, you can go to the next step.
4) This is what your app has to do to let a keystroke through: The user presses a key, your app catches it. Then it changes it's mode (see 2) ) to not catch any keystrokes at all, posts the corresponding event for that key in the fitting /dev/input/eventX-file, and sets itself to catch keystrokes again.
Before the whole thing make sure, your /dev/input/eventX-file has a chmod of 666 or therelike, since you can't write into it from your app. You only need root for that, after that you don't need root. The OS resets the chmod on each reboot.
It is a hell of a lot of work. Calculate about a week or more for just that (at least that was what it took me to figure it all out). Good luck
PS: If you get your app system privileges, there is also the android.permission.INJECT_EVENTS, which allows you to inject key- and touch-events to another app using a simple function (can't remember it, but Google does). For your app to be able to get system privileges you need to copy it to /system/app, which requires root and a mounted /system. Catching the keystrokes still works the same way as above.
Click to expand...
Click to collapse
Thank you for your innovative solution
I do not understand two points:
1. How does your app will stay on top and its windows receives events, when the user opens another app, a game for example.
2. How does the background app, the game, keep running? Isn't the game onPause() when you are running your app in front?
Thanks you.
Dakkaron said:
2) Open up a system alert window with no content. There is a setting somewhere that lets you catch all keystrokes and touches. This blocks them all from going through
Click to expand...
Click to collapse
Can you please try to remember and elaborate " a setting somewhere" part?

Tasker WiFi Sign-in?

I have just recently started using Tasker for some simple tasks like turning on/off GPS or WiFi, silencing my phone, etc... And I am trying to figure out how to set up a task to sign in to secured WiFi SSIDs. My work and school both require you to "sign in" before you can use their WiFi, so my phone tells my whenever it connects, to "Sign into Wi-Fi Network". Both of them are different however. My work is a simple checkbox to "agree" to the store's conditions My school, I actually have to type in my student information.
What I would like to do is make a task to automate that signing in process as soon as my phone connects to the WiFi. Has anyone done anything like this or have any suggestions how to go about it?
Tasker is a very powerful app whose full capabilities I personally haven't even started to scratch...play around especially with creating variables under the NET > Wifi Connected/Near task or profile and I think you'll be able to write a simple profile to do this for you. Best way to do this is when you're actually on/near that network so you can automatically pull in the details of the Mac address or SSID...
You can start by looking here to see if you can "kang" one profile/task or so
http://tasker.wikidot.com/profile-index
Under Advanced category on this wiki look to see how you can modify the Wifi Auto Start/Stop profile...
I tried to do something like this a long time ago but figured it.
Hope some one can help out
Sent from my GT-N8013
Moe5508 said:
Tasker is a very powerful app whose full capabilities I personally haven't even started to scratch...play around especially with creating variables under the NET > Wifi Connected/Near task or profile and I think you'll be able to write a simple profile to do this for you. Best way to do this is when you're actually on/near that network so you can automatically pull in the details of the Mac address or SSID...
You can start by looking here to see if you can "kang" one profile/task or so
http://tasker.wikidot.com/profile-index
Under Advanced category on this wiki look to see how you can modify the Wifi Auto Start/Stop profile...
Click to expand...
Click to collapse
I'm afraid I may have to write some sort of script to handle the authentication. I can make it check to see if I'm connected, and I should be able to see if I have connectivity or not, but I don't know where to go from there.
EDIT: On further examination, I don't see a way to check WiFi connectivity or speeds.
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
There is the newbie tut thread... and a Google group
Sent from my Vivid 4G using Tapatalk 2
rignfool said:
There is the newbie tut thread... and a Google group
Sent from my Vivid 4G using Tapatalk 2
Click to expand...
Click to collapse
And this is not a newbie tut issue. It looks like people all over the internet have been trying to do it, and there hasn't been much progress.
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
I've tried to do something similar some time ago to login to fon networks, with no luck I'm afraid
My best guess was trying to use "http post" plugin
https://play.google.com/store/apps/details?id=com.steelgirder.LocaleSendEmailPlugin
But still the lack of knowledge took ahead of me, maybe you can have a look at it
wish you better luck than mine :thumbup:
Sent from my Nexus 7 using Tapatalk HD
I solved one of them!!! I was able to get it (I think, haven't field tested yet) to work with my work WiFi Here's my setup:
State: Wifi Connected Guest,*,* (Name of SSID is Guest)
1. Browse URL *the URL for the login page*
2. Run Shell [Command: sleep 0.1; input tap 50 715; sleep 0.025; input tap 620 800 Timeout: 0 Use Root: Yes]
The coordinates in the "input tap" sections are the coordinates for the "agree" checkbox, and the "agree" button, respectively This seems to work awesome, but I have to try it when I'm there. I'm now going to try and figure out how to make it do it while the phone is asleep
BTW, an easy way to get those coordinates is to turn on "Show Pointer Location" in Developer Settings.
@Drinfernoo
I am going to tedt this out on Monday at work
Sent from my GT-N7000 using Tapatalk 2
I use a great app called WiFi Web Login. It's pretty cheap in the play store. Logs into my school WiFi flawlessly every time.
Sent from my SPH-L710 using xda app-developers app
ooonimrodooo said:
I use a great app called WiFi Web Login. It's pretty cheap in the play store. Logs into my school WiFi flawlessly every time.
Sent from my SPH-L710 using xda app-developers app
Click to expand...
Click to collapse
Definitely worth a shot Thank you.
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
Of course! You won't be disappointed.
Sent from my SPH-L710 using xda app-developers app
I just purchased the app. Works well on both secured wireless network login page and guess wifi at my school.
Interpreting the pointer position
drinfernoo said:
I solved one of them!!! I was able to get it (I think, haven't field tested yet) to work with my work WiFi Here's my setup:
State: Wifi Connected Guest,*,* (Name of SSID is Guest)
1. Browse URL *the URL for the login page*
2. Run Shell [Command: sleep 0.1; input tap 50 715; sleep 0.025; input tap 620 800 Timeout: 0 Use Root: Yes]
The coordinates in the "input tap" sections are the coordinates for the "agree" checkbox, and the "agree" button, respectively This seems to work awesome, but I have to try it when I'm there. I'm now going to try and figure out how to make it do it while the phone is asleep
BTW, an easy way to get those coordinates is to turn on "Show Pointer Location" in Developer Settings.
Click to expand...
Click to collapse
Can you explain how to interpret the coordinate figures from using the "show pointer location"
Mine are P: 0/1
dx:1.5
dy:-1.5
Xv:0.0
Yv:0.045
prs: 0.58
Size: 0.27
Which ones are relevant to the command line? Can you provide a relevant command line for those readings. It is just one ok button that needs to be pressed.
Thanks in advance!
Okay so I just used an app called Wifi Web Login.
tab through links and then press enter when the button is highlighted using keyevent
drinfernoo said:
I solved one of them!!! I was able to get it (I think, haven't field tested yet) to work with my work WiFi Here's my setup:
State: Wifi Connected Guest,*,* (Name of SSID is Guest)
1. Browse URL *the URL for the login page*
2. Run Shell [Command: sleep 0.1; input tap 50 715; sleep 0.025; input tap 620 800 Timeout: 0 Use Root: Yes]
The coordinates in the "input tap" sections are the coordinates for the "agree" checkbox, and the "agree" button, respectively This seems to work awesome, but I have to try it when I'm there. I'm now going to try and figure out how to make it do it while the phone is asleep
BTW, an easy way to get those coordinates is to turn on "Show Pointer Location" in Developer Settings.
Click to expand...
Click to collapse
Thanks so much for posting this! I had a similar problem where my Wifi at work requires users to accept the TOS every time they login. For me I just have to click on a log in button. The tap command would have been too complicated because there was a lot of scrolling to get to the accept button at the bottom of the page. My solution was very similar and uses the input keyevent shell command which simulates key presses on the keyboard. You could probably use this method to input your login information by using the right sequence of simulated keyboard presses. For my situation the pertinent key presses are keyevent 61 which is Tab, to highlight and advance through elements on the page, and keyevent 66 which is enter, to "click" on the accept button. I found a complete list of keyevent codes on the android developers website by goggling "input keyevent android"
1. Browse URL (login page link) - This opens it in my default browser which is chrome.
2. Run Shell (input keyevent 61; input keyevent 61; input keyevent 61; input keyevent 61; input keyevent 61; input keyevent 61; input keyevent 61; input keyevent 61; input keyevent 66) - This will tab through the links on the login page until the accept button is highlighted and then the enter key will be pressed.
I'm kind of a newb and this is my first post so if anyone has any tips for shortening my shell command please let me know. I was trying to figure out how to press Shift and Tab simultaneously to take me directly to the last element on the page (which is the accept button) but couldn't figure it out. I would be super grateful if anyone could share how to do this.
I am trying something similar. My problem is that the login "page" is a notification based Android System popup. If I could get tasker to load the notification I can use intents to fill out the fields. Any ideas?
For any future people, this is not hard to accomplish through direct and "proper" means.
Create a profile that detects when you connect to a network, and in tasker, check through Java code whether you're connected or not, and if not, connect by having tasker POST the data
Easy, fast, direct, and no need to do anything like simulating key presses
To get the URL and data fields you need for POST , you'll need to do a little dev debugging to figure it out. (Check the HTML)
Find the Java code in the first answer, isWalledGardenConnection()
https://stackoverflow.com/questions...cted-internet-access-captive-portal-detection
Working great for me, check my screenshot
P.S. You can see my tasker profile and task scripts for an example
Can you expand on this and post login for Starbucks,
Wendy's etc?
BBRecon said:
For any future people, this is not hard to accomplish through direct and "proper" means.
Create a profile that detects when you connect to a network, and in tasker, check through Java code whether you're connected or not, and if not, connect by having tasker POST the data
Easy, fast, direct, and no need to do anything like simulating key presses
To get the URL and data fields you need for POST , you'll need to do a little dev debugging to figure it out. (Check the HTML)
Find the Java code in the first answer, isWalledGardenConnection()
https://stackoverflow.com/questions...cted-internet-access-captive-portal-detection
Working great for me, check my screenshot
P.S. You can see my tasker profile and task scripts for an example
Click to expand...
Click to collapse
edmondt said:
Can you expand on this and post login for Starbucks,
Wendy's etc?
Click to expand...
Click to collapse
Here is more example. No guarantee it works for you, it's highly specific to my device probably
BBRecon said:
Here is more example. No guarantee it works for you, it's highly specific to my device probably
Click to expand...
Click to collapse
That Looks amazing!! Gonna play with it and try Mc Donnalds etc..

[Q] Tasker, Autovoice and yatse

id like to intergrate yatse voice control with tasker and autovoice. id like to be able to say "xbmc" and then have the yatse voice control pop up to open up.
taking it a step further, id like to be able to control xbmc using autovoice itself, for example, open the autovoice popup and say "i want to watch (movie)" and then the system does the rest.
simple in essence, however i cannot find the correct way to do it.
According to the developers if Yatse themselves you should be able to accomplish this with the API.
http://yatse.leetzone.org/redmine/projects/androidwidget/wiki/Api
Not sure but you could try to send an intent with Tasker. Try this for playing a movie:
Profile:
Autovoice recognize:"xbmc"
Task:
Send intent
Action: org.leetzone.android.yatsewidget.ACTION_APP_VOICECOMMAND_PARSER
Extra: org.leetzone.android.yatsewidget.EXTRA_STRING_PARAMS:%avcommnofilter
Target: Service
The %avcommnofilter contains whatever you said after the trigger. Which is 'xbmc' in this case. So the command "xbmc play <movie>" would send org.leetzone.android.yatsewidget.EXTRA_STRING_PARAMS: play <movie> to yatse.
As for play, pause or stop you would use the MEDIA_COMMAND instead of the PARSER.
Let me know if it works. If not, maybe someone else can shed some light. I quite like the idea you've got there.
I don't know what i might be doing wrong, but i tried doing this and i'm not able to get this to work. Is there some special settings i need to have setup on xbmc/yatse?
Update: I got it figured out. Was doing something wrong, but all is good now.
What did you do to get it working.... using the sample above not getting anying
clayboy said:
What did you do to get it working.... using the sample above not getting anying
Click to expand...
Click to collapse
You need to take the spaces out of the action and extra lines. For some reason xda adds them, They aren't needed and are what's screwing it up if you do a direct 1:1 copy of the lines.
stearic said:
You need to take the spaces out of the action and extra lines. For some reason xda adds them, They aren't needed and are what's screwing it up if you do a direct 1:1 copy of the lines.
Click to expand...
Click to collapse
i typed it out without spaces and still unable to play a movie
clayboy said:
i typed it out without spaces and still unable to play a movie
Click to expand...
Click to collapse
Do you have the premium version of yatse?
stearic said:
Do you have the premium version of yatse?
Click to expand...
Click to collapse
yeah... I finallly got it by copying and pasting... just outrageous i spent hours trying to get it to work.... lol... thx now to get tasker to control my amp from avr romte... oh boy:good:
Yea, i spent a few hours only to find out that something didn't copy or paste right so it was all screwed up because of that.
Control XBMC from Tasker & AutoVoice
You know, you can take this one step further and actually control XBMC directly from an AutoVoice command just as you were seeking.
Here's how to do it... http://kinkeadtech.com/2014/08/control-xbmc-from-tasker/

Categories

Resources