Jump to content

Tasker Profile to start mapping when 4g is available


Recommended Posts

I am new to tasker. I am working on creating a way to notify me when I have 4g access.


If possible, I would also like to start mapping with Sensorly so that I can share. I don't actually have 4g coverage, so I'm wondering if anyone has a vetted profile that I can copy.


Any advice or information is appreciated. Thanks in advance!

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • large.unreadcontent.png.6ef00db54e758d06

  • gallery_1_23_9202.png

  • Similar Content

    • By enormous
      I decided to make this it's own thread, as I've gone and made it overly complicated.
      Since we're letting our geek flags fly... Here is my Tasker setup that I created to aid me in tracking down LTE signal. I created this because if you're trying to be a "Sensorly Cartographer" like myself, it's annoying to have to keep your phone in front of your face all of the time, switching in and out of airplane mode, checking to see if the 3G now reads 4G. The most annoying thing for me is that if you lose your LTE signal, you'll have to 1) notice that it's gone, and 2) start cycling airplane mode again. This setup automates that, so if you're searching with Sensorly you just have to hit a button, and if there's LTE around you'll connect to it a lot faster. It's got a few moving parts to it, but so far it's worked out for me.
      WARNING: be aware that this WILL increase your battery consumption if (for some reason) you leave it running when not activily mapping.
      I highly recommend anyone who loves their Android phone to buy Tasker. I've had it for years, and am able to automate so many parts of my phone with it. I know I'm just scratching the surface with what I use it for too.
      To fully utilize this you'll be creating 3 tasks, 2 profiles and a widget icon on your home screen.
      Task 1: "Modified Airplane Mode Toggle" (Download here: Task-ModifiedAirplaneModeToggle.xml)

      Modified Airplane Mode Toggle A1: Flash [ Text:Airplane Toggle Long:Off ] A2: Airplane Radios [ Bluetooth:Off Cell:On NFC:Off Wifi:Off Wimax:On ] A3: Airplane Mode [ Set:On ] A4: Wait [ MS:0 Seconds:20 Minutes:0 Hours:0 Days:0 ] A5: Airplane Mode [ Set:Off ]
      What it does: it turns a modified airplane mode on (modified because I kept getting annoyed at the regular airplane mode cutting off my bluetooth headphones), waits 20 seconds, and toggles the airplane mode back off. 20 seconds is long enough for radio to do an LTE scan when it comes back online.
      On line A1, when things are set to "On" that means that they will be disabled by a Tasker Airplane Mode action, and "Off" means they won't be disabled by Tasker's Airplane Mode. I also set Wimax to "On" because, well, why not?
      Task 2: "4G Scan Monitor" (Download here:Task-4GScanMonitor.xml)

      4G Scan Monitor A1: If [ %4GSCAN Is Set ] A2: If [ %HAVE4G ! Set ] A3: Perform Task [ Name:Modified Airplane Mode Toggle Stop:Off Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ] A4: Wait [ MS:0 Seconds:45 Minutes:0 Hours:0 Days:0 ] A5: Goto [ Type:Action Number Number:1 Label: ] A6: End If A7: End If
      This simulates a while loop, checking to see two things: if you have turned on your "scanning" widget to scan (more on that in a bit), and if you currently do not have 4G coverage (keep reading!). It then runs the "Modified Airplane Mode Toggle", waits 45 seconds, and goes back to the first line.
      Task 3: "Airplane Toggle Widget" (Download: SEE BELOW)

      Airplane Toggle Widget A1: If [ %4GSCAN Is Set ] A2: Variable Clear [ Name:%4GSCAN Pattern Matching:Off ] A3: Set Widget Icon [ Name:Airplane Toggle Widget Icon:<icon> ] A4: Else A5: Variable Set [ Name:%4GSCAN To:1 Do Maths:Off Append:Off ] A6: Set Widget Icon [ Name:Airplane Toggle Widget Icon:<icon> ]
      This is the logic behind the widget button you'll create later. It just sets/unsets the variable that controls whether or not you will be popping into/out of airplane mode.
      Profile 1: "In LTE" (Download here: Profile-InLTE.xml)

      Profile: In LTE State: Mobile Network [ 2G:Off 3G:Off 3G - HSPA:Off 4G:On ] Enter: Anon A1: Variable Set [ Name:%HAVE4G To:1 Do Maths:Off Append:Off ] Exit: Anon A1: Variable Clear [ Name:%HAVE4G Pattern Matching:Off ] A2: If [ %4GSCAN Is Set ] A3: Perform Task [ Name:4G Scan Monitor Stop:Off Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
      This profile sets a variable when you enter into 4G coverage. When you leave/lose 4G, it will check to see if you're currently in "scanning mode". If you are, it will start the scan over again.
      Profile 2: "Run 4G Scan" (Download here: Profile-Run4GScan.xml)

      Profile: Run 4G Scan State: Variable Value [ Name:%4GSCAN Op:Is Set Value:* ] Enter: 4G Scan Monitor
      This simply monitors the variable set by your widget toggle, and runs the "4G Scan Monitor" task.
      To add the widget:
      Long press on your launcher home screen: select Widget. Scroll down to "Tasker" and select "Task". From the list that pops up select "Airplane Toggle Widget".
      How to use:
      Start Sensorly
      Get a GPS lock
      Click the Start button on the Map Trip screen
      Hit your Home button to return to your launcher
      Tap the "Airplane Toggle Widget" you added earlier

      This will keep Sensorly running in the background. If/when your phone latches on to 4G, Sensorly will immediately start recording your 4G points.
      Recommended reading: http://forum.xda-dev...d.php?t=1110775
      I have also attached the two Profile XML files you can import directly into Tasker to make setting all of this easier. The should set up Profiles 1 and 2, as well as Tasks 1 and 2.
      For some reason the forum won't let me upload the XML file for the Airplane Toggle Widget. Just copy and paste the following into an XML file named "AirplaneToggleWidget.xml", and import it that way.

      <TaskerData sr="" dvi="1" tv="1.3.3u2m"> <Task sr="task89"> <cdate>1354205330359</cdate> <edate>1354207750344</edate> <id>89</id> <nme>Airplane Toggle Widget</nme> <Action sr="act0" ve="3"> <code>37</code> <lhs>%4GSCAN</lhs> <op>9</op> <rhs></rhs> </Action> <Action sr="act1" ve="3"> <code>549</code> <Str sr="arg0" ve="3">%4GSCAN</Str> <Int sr="arg1" val="0"/> </Action> <Action sr="act2" ve="3"> <code>152</code> <Str sr="arg0" ve="3">Airplane Toggle Widget</Str> <Img sr="arg1" ve="2"> <icn>2130837588</icn> </Img> </Action> <Action sr="act3" ve="3"> <code>43</code> </Action> <Action sr="act4" ve="3"> <code>547</code> <Str sr="arg0" ve="3">%4GSCAN</Str> <Str sr="arg1" ve="3">1</Str> <Int sr="arg2" val="0"/> <Int sr="arg3" val="0"/> </Action> <Action sr="act5" ve="3"> <code>152</code> <Str sr="arg0" ve="3">Airplane Toggle Widget</Str> <Img sr="arg1" ve="2"> <icn>2130837617</icn> </Img> </Action> <Img sr="icn" ve="2"> <icn>2130837588</icn> </Img> </Task> </TaskerData>
      To import the Tasks and Profiles
      First download the XML files to your phone. In certain browsers they will ask you if you want to open the file with Tasker. If your browser just offers to save the file, use a file explorer to move it to /sdcard/Tasker/tasks (for Tasks) or /sdcard/Tasker/profiles (for Profiles). Then go into Tasker and do a long-tap on the Profiles tab header. To import Tasks do the same on the Tasks tab header.
      Please let me know if you find any errors in my logic, as I'm sure there are a few.
      Happy hunting!
  • Posts

  • Recently Browsing

    • No registered users viewing this page.
  • Create New...