• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Tasker WiFi Sign-in?

Search This thread

drinfernoo

Senior Member
Dec 25, 2012
1,562
323
Yakima, WA
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 :D 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?
 

Moe5508

Senior Member
Jun 18, 2007
3,045
318
www.manicorp.com
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...
 
Last edited:

aalupatti

Senior Member
Feb 20, 2011
2,871
700
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
 

drinfernoo

Senior Member
Dec 25, 2012
1,562
323
Yakima, WA
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'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
 
Last edited:

drinfernoo

Senior Member
Dec 25, 2012
1,562
323
Yakima, WA
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 :D

BTW, an easy way to get those coordinates is to turn on "Show Pointer Location" in Developer Settings.
 

aalupatti

Senior Member
Feb 20, 2011
2,871
700
@Drinfernoo
I am going to tedt this out on Monday at work

Sent from my GT-N7000 using Tapatalk 2
 

ChocoboX

Senior Member
Sep 6, 2010
59
3
I just purchased the app. Works well on both secured wireless network login page and guess wifi at my school.
 

thisisntjoe

New member
Jun 23, 2013
2
0
Interpreting the pointer position

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 :D

BTW, an easy way to get those coordinates is to turn on "Show Pointer Location" in Developer Settings.

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.
 
Last edited:

HarveyDroidGeek

New member
Aug 18, 2014
1
4
tab through links and then press enter when the button is highlighted using keyevent

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 :D

BTW, an easy way to get those coordinates is to turn on "Show Pointer Location" in Developer Settings.

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.
 

snorrski

Member
Nov 12, 2013
34
10
Copenhagen
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?
 

BBRecon

Senior Member
May 2, 2016
94
35
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
 

Attachments

  • Screenshot_2017-08-24-15-06-09.jpg
    Screenshot_2017-08-24-15-06-09.jpg
    167 KB · Views: 432
  • tasker-xml.zip
    1.7 KB · Views: 162
Last edited:

edmondt

Senior Member
Mar 21, 2006
622
254
Toronto
Can you expand on this and post login for Starbucks,
Wendy's etc?

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
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    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 :D

    BTW, an easy way to get those coordinates is to turn on "Show Pointer Location" in Developer Settings.
    4
    tab through links and then press enter when the button is highlighted using keyevent

    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 :D

    BTW, an easy way to get those coordinates is to turn on "Show Pointer Location" in Developer Settings.

    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.
    3
    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
    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
    1
    Of course! You won't be disappointed.

    Sent from my SPH-L710 using xda app-developers app