Tasker Dual sim data switcher Fi - Google Pixel 4 Guides, News, & Discussion

I'm not a tasker pro, so there are probably at least 20 ways this can be better. I wanted a way to quickly change which sim is used for data. I created a task in tasker which is called from a quick tile to do the switch.
The tasker stuff is after the green text (if you just want to scroll).
Fi has 3 cellular providers, TMobile, Sprint and US cellular.
There are 9 options for providers in Android global settings:
mobile_data1, mobile_data2, ... mobile_data9 (might also be a mobile_data (with out a numerical suffix), can't remember lol).
Your sim will use one for each provider. So I would have 3 providers for Fi and 1 for at&t. You will need to figure out which of the 9 you are using. Easy way would be to use autotools and read the values of these settings then just "flash" the value on the screen. If you have a computer and can use adb, that works too. You can use fiswitch to change Fi providers, then use the flash method to figure out the provider number.
In my case it was mobile_data4 (TMobile), mobile_data5 (Sprint), mobile_data6 (US cellular), and mobile_data8 (at&t).
When switching SIMs the active sim has all of its providers disabled. The providers for the new sim are then enabled. After that you update a setting (multi_sim_data_call) to tell Android which provider to use for data. You will want to disable data, update this setting, then enable data. You will also need to stop and start ril-daemon using a shell command (toggling air plane mode works too, but I think restarting ril is faster).
Note: because I use Fi soon for phone, I use the setting to figure out which provider to use when switching to fi.
I used autotools to set the globals because that's where I started (it's working great so I don't want to mess with it). There are probably several ways to do it.
Here's what I did in tasker:
SIM Swap Example (18)
<get current data provider>
A1: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: multi_sim_data_call
Input Type: String
Read Setting: true Timeout (Seconds):60 ]
<get current phone provider>
A2: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: multi_sim_voice_call
Input Type: String
Read Setting: true Timeout (Seconds):60 ]
A3: [X] Flash [ Textata: %multi_sim_data_call Voice: %multi_sim_voice_call Longff ]
<if att>
A4: If [ %multi_sim_data_call ~ 8 ]
<disable att>
A5: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: mobile_data8
Input Type: Int
Value: 0 Timeout (Seconds):60 ]
<enable TMobile>
A6: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: mobile_data4
Input Type: Int
Value: 1 Timeout (Seconds):60 ]
<enable sprint>
A7: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: mobile_data5
Input Type: Int
Value: 1 Timeout (Seconds):60 ]
<enable us cellular>
A8: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: mobile_data6
Input Type: Int
Value: 1 Timeout (Seconds):60 ]
<set data to fi phone provider>
A9: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: multi_sim_data_call
Input Type: String
Value: %multi_sim_voice_call Timeout (Seconds):60 ]
A10: Mobile Data [ Setff ]
<stop ril-daemon>
A11: Run Shell [ Command:stop ril-daemon Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
<else fi selected>
A12: Else
<disable Fi (TMobile)>
A13: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: mobile_data4
Input Type: Int
Value: 0 Timeout (Seconds):60 ]
<disable Sprint>
A14: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: mobile_data5
Input Type: Int
Value: 0 Timeout (Seconds):60 ]
<disable us cellular>
A15: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: mobile_data6
Input Type: Int
Value: 0 Timeout (Seconds):60 ]
<enable at&t>
A16: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: mobile_data8
Input Type: Int
Value: 1 Timeout (Seconds):60 ]
<set data to at&t>
A17: AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: multi_sim_data_call
Input Type: String
Value: 8 Timeout (Seconds):60 ]
A18: Mobile Data [ Setff ]
<stop ril-daemon>
A19: Run Shell [ Command:stop ril-daemon Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
A20: End If
A21: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
<start ril-daemon>
A22: Run Shell [ Command:start ril-daemon Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
A23: Mobile Data [ Setn ]
A24: [X] AutoTools Secure Settings [ Configuration:Setting Type: Global
Name: multi_sim_data_call
Input Type: String
Read Setting: true Timeout (Seconds):60 ]
A25: [X] Flash [ Textata: %multi_sim_data_call Voice: %multi_sim_voice_call Longff ]

Related

Pebble smart start

Hello everyone, I just received my pebble watch yesterday from best buy and I had a good idea or concept for pebble. I'm not an expert on making apps or hacking but, I do know a little and I'm still learning. What I'm trying to do if possible is remote start/lock and unlock your vehicle from your pebble, calling it pebble smart start. Of course you would need a viper smart start device installed on your vehicle or by hacking an odb scanner dongle to send commands via blue tooth. So far I'm figuring out what I can do with Tasker and pebble Tasker app. I know it's not impossible to come up with this, I just don't have enough experience but, if anybody wants to help or start developing something of this sorts I will gladly donate some cash and help on anything I can. In the mean time I'm gathering info and more Ideas to make this happen. I think it would be awesome to have something like this. People are already opening garage doors with the pebble watch.
Sent from my HTC One using Tapatalk 2
With Pebble Tasker or Glance you can launch any tasker task and since tasker can already do this with compatible Viper equipment, it's not only possible but really very simple. You just need the watch, tasker and a viper remote start compatible system.
Thanks I have every thing accept the viper smart start which I'm planning on getting sometime next week.
Sent from my HTC One using Tapatalk 2
Anyone know how to get this to work?
Sent from my GT-N8013 using Tapatalk 4
This is the link for the instructions: https://plus.google.com/109925457418000128828/posts/WKjzY7rktKz
I don't use Viper but I would assume just map the proper task. Let us know if anyone gets this working, this sounds pretty cool ^___^
Sent from my Nexus 7 using xda app-developers app
I've been doing this for a while, but I just saw this thread.
Here's a task I've been using. You need to feed it your Viper username and password, the command you want to send, and your vehicleID. I'll put that task in, too. Basically, it send the credentials out and receives a sessionID. Then, using that ID, it sends the control command. You can send it "arm", "disarm", and "remote". The %SERVER value is "https://colt/calamp-ts.com". Then, I just use PebbleTasker to run tasks that set the command variable and run the Send Command Task. I get a notification depending on if it responds with success or an error.
Car Send Command (94)
<Success Pattern>
A2: HTTP Get [ Serverort:%SERVER Path:auth/login/%username/%password Attributes: Cookies: Timeout:10 Mime Type:text/* Output File:vipersessid ]
A3: Variable Set [ Name:%viperssiddata To:%HTTPD Do Mathsff Appendff ]
A4: Variable Split [ Name:%viperssiddata Splitter:"SessionID":" Delete Baseff ]
A5: Variable Split [ Name:%viperssiddata2 Splitter:"," Delete Baseff ]
A6: Variable Set [ Name:%sessid To:%viperssiddata21 Do Mathsff Appendff ]
A8: HTTP Get [ Serverort:%SSSERVER Path:device/sendcommand/%SSVEHICLEID/%SSCOMMAND?sessid=%sessid Attributes: Cookies: Timeout:10 Mime Type:text/* Output File:viperdata ]
A9: If [ %HTTPD ~ *"StatusCode"* ]
A10: Variable Set [ Name:%SSRESPONSE To:%HTTPD Do Mathsff Appendff ]
A11: Variable Set [ Name:%SSLASTCOMMANDRESULT To:Last comm: "%SSCOMMAND," received. Do Mathsff Appendff ]
A12: Pebble Notifier [ Configuration:Notification with title: "Prius" and body: "% Package:com.dattasmoon.pebble.plugin Nameebble Notifier Continue Task After Errorn ]
<Success Pattern>
A13: Vibrate Pattern [ Pattern:%SUCCESSPATTERN ]
A14: Else
A15: Variable Set [ Name:%SSRESPONSE To:ERROR Do Mathsff Appendff ]
A16: Variable Set [ Name:%SSLASTCOMMANDRESULT To:Last comm: "%SSCOMMAND," failed. Do Mathsff Appendff ]
A17: Pebble Notifier [ Configuration:Notification with title: "Prius" and body: "% Package:com.dattasmoon.pebble.plugin Nameebble Notifier Continue Task After Errorn ]
<Error Pattern>
A18: Vibrate Pattern [ Pattern:%ERRORPATTERN ]
A19: End If
A20: Perform Task [ Name:Show Car Remote Notification Stopff Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
This one fetches the carID and keeps it in a global variable. It also needs the username and password. You may need to adjust the parsing if you have more then one car in the system.
Car Fetch Id (99)
A1: Variable Set [ Name:%SSSERVER To:https://colt.calamp-ts.com Do Mathsff Appendff ]
A2: HTTP Get [ Serverort:%SSSERVER Path:auth/login/%username/%password Attributes: Cookies: Timeout:10 Mime Type:text/* Output File:vipersessid ]
A3: Variable Set [ Name:%viperssiddata To:%HTTPD Do Mathsff Appendff ]
A4: Variable Split [ Name:%viperssiddata Splitter:"SessionID":" Delete Baseff ]
A5: Variable Split [ Name:%viperssiddata2 Splitter:"," Delete Baseff ]
A6: Variable Set [ Name:%sessid To:%viperssiddata21 Do Mathsff Appendff ]
A8: HTTP Get [ Serverort:%SERVER Path:device/advancedsearch?sessid=%sessid Attributes: Cookies: Timeout:10 Mime Type:text/* Output File:viperdata ]
A10: Variable Set [ Name:%vipervehicleiddata To:%HTTPD Do Mathsff Appendff ]
A11: Variable Split [ Name:%vipervehicleiddata Splitter:"DeviceId":" Delete Baseff ]
A12: Variable Split [ Name:%vipervehicleiddata2 Splitter:"," Delete Baseff ]
A13: Variable Set [ Name:%SSVEHICLEID To:%vipervehicleiddata21 Do Mathsff Appendff ]
Im new to tasker and android, but i want to do this. Where do i put this code?
ecordova6 said:
Im new to tasker and android, but i want to do this. Where do i put this code?
Click to expand...
Click to collapse
Looking to try this out. Any answers?
Go into Tasker and create a new task. Start adding actions and fill them out according to the line descriptions in the previous post. Do it all again for the second task listed. That one will need to be run on its own once to grab the vehicle id.
These are pretty complicated tasks that will likely require personalization and troubleshooting based on your individual setup. I'd highly suggest working on some simpler tasks first to gain familiarity with Tasker. It's a really complex program, but highly worth learning.
Thanks I figured it out but opted to do it with my glass rather than the Pebble. Voice commands are a pretty cool way to do it.
hawkjm73 said:
I've been doing this for a while, but I just saw this thread.
Here's a task I've been using. You need to feed it your Viper username and password, the command you want to send, and your vehicleID. I'll put that task in, too. Basically, it send the credentials out and receives a sessionID. Then, using that ID, it sends the control command. You can send it "arm", "disarm", and "remote". The %SERVER value is "https://colt/calamp-ts.com". Then, I just use PebbleTasker to run tasks that set the command variable and run the Send Command Task. I get a notification depending on if it responds with success or an error.
Car Send Command (94)
<Success Pattern>
A2: HTTP Get [ Serverort:%SERVER Path:auth/login/%username/%password Attributes: Cookies: Timeout:10 Mime Type:text/* Output File:vipersessid ]
A3: Variable Set [ Name:%viperssiddata To:%HTTPD Do Mathsff Appendff ]
A4: Variable Split [ Name:%viperssiddata Splitter:"SessionID":" Delete Baseff ]
A5: Variable Split [ Name:%viperssiddata2 Splitter:"," Delete Baseff ]
A6: Variable Set [ Name:%sessid To:%viperssiddata21 Do Mathsff Appendff ]
A8: HTTP Get [ Serverort:%SSSERVER Path:device/sendcommand/%SSVEHICLEID/%SSCOMMAND?sessid=%sessid Attributes: Cookies: Timeout:10 Mime Type:text/* Output File:viperdata ]
A9: If [ %HTTPD ~ *"StatusCode"* ]
A10: Variable Set [ Name:%SSRESPONSE To:%HTTPD Do Mathsff Appendff ]
A11: Variable Set [ Name:%SSLASTCOMMANDRESULT To:Last comm: "%SSCOMMAND," received. Do Mathsff Appendff ]
A12: Pebble Notifier [ Configuration:Notification with title: "Prius" and body: "% Package:com.dattasmoon.pebble.plugin Nameebble Notifier Continue Task After Errorn ]
<Success Pattern>
A13: Vibrate Pattern [ Pattern:%SUCCESSPATTERN ]
A14: Else
A15: Variable Set [ Name:%SSRESPONSE To:ERROR Do Mathsff Appendff ]
A16: Variable Set [ Name:%SSLASTCOMMANDRESULT To:Last comm: "%SSCOMMAND," failed. Do Mathsff Appendff ]
A17: Pebble Notifier [ Configuration:Notification with title: "Prius" and body: "% Package:com.dattasmoon.pebble.plugin Nameebble Notifier Continue Task After Errorn ]
<Error Pattern>
A18: Vibrate Pattern [ Pattern:%ERRORPATTERN ]
A19: End If
A20: Perform Task [ Name:Show Car Remote Notification Stopff Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
This one fetches the carID and keeps it in a global variable. It also needs the username and password. You may need to adjust the parsing if you have more then one car in the system.
Car Fetch Id (99)
A1: Variable Set [ Name:%SSSERVER To:https://colt.calamp-ts.com Do Mathsff Appendff ]
A2: HTTP Get [ Serverort:%SSSERVER Path:auth/login/%username/%password Attributes: Cookies: Timeout:10 Mime Type:text/* Output File:vipersessid ]
A3: Variable Set [ Name:%viperssiddata To:%HTTPD Do Mathsff Appendff ]
A4: Variable Split [ Name:%viperssiddata Splitter:"SessionID":" Delete Baseff ]
A5: Variable Split [ Name:%viperssiddata2 Splitter:"," Delete Baseff ]
A6: Variable Set [ Name:%sessid To:%viperssiddata21 Do Mathsff Appendff ]
A8: HTTP Get [ Serverort:%SERVER Path:device/advancedsearch?sessid=%sessid Attributes: Cookies: Timeout:10 Mime Type:text/* Output File:viperdata ]
A10: Variable Set [ Name:%vipervehicleiddata To:%HTTPD Do Mathsff Appendff ]
A11: Variable Split [ Name:%vipervehicleiddata Splitter:"DeviceId":" Delete Baseff ]
A12: Variable Split [ Name:%vipervehicleiddata2 Splitter:"," Delete Baseff ]
A13: Variable Set [ Name:%SSVEHICLEID To:%vipervehicleiddata21 Do Mathsff Appendff ]
Click to expand...
Click to collapse
I see a bunch of smiley faces in the text. I dont think I can use this code when its like that.
Funkquito said:
I see a bunch of smiley faces in the text. I dont think I can use this code when its like that.
Click to expand...
Click to collapse
11min into the new day here where I live and you've officially secured the winning of the Internets for the day.
Sent from my Nexus 5 using XDA Premium 4 mobile app
hawkjm73 said:
I've been doing this for a while, but I just saw this thread.
Here's a task I've been using. You need to feed it your Viper username and password, the command you want to send, and your vehicleID. I'll put that task in, too. Basically, it send the credentials out and receives a sessionID. Then, using that ID, it sends the control command. You can send it "arm", "disarm", and "remote". The %SERVER value is "https://colt/calamp-ts.com". Then, I just use PebbleTasker to run tasks that set the command variable and run the Send Command Task. I get a notification depending on if it responds with success or an error.
Car Send Command (94)
<Success Pattern>
A2: HTTP Get [ Serverort:%SERVER Path:auth/login/%username/%password Attributes: Cookies: Timeout:10 Mime Type:text/* Output File:vipersessid ]
A3: Variable Set [ Name:%viperssiddata To:%HTTPD Do Mathsff Appendff ]
A4: Variable Split [ Name:%viperssiddata Splitter:"SessionID":" Delete Baseff ]
A5: Variable Split [ Name:%viperssiddata2 Splitter:"," Delete Baseff ]
A6: Variable Set [ Name:%sessid To:%viperssiddata21 Do Mathsff Appendff ]
A8: HTTP Get [ Serverort:%SSSERVER Path:device/sendcommand/%SSVEHICLEID/%SSCOMMAND?sessid=%sessid Attributes: Cookies: Timeout:10 Mime Type:text/* Output File:viperdata ]
A9: If [ %HTTPD ~ *"StatusCode"* ]
A10: Variable Set [ Name:%SSRESPONSE To:%HTTPD Do Mathsff Appendff ]
A11: Variable Set [ Name:%SSLASTCOMMANDRESULT To:Last comm: "%SSCOMMAND," received. Do Mathsff Appendff ]
A12: Pebble Notifier [ Configuration:Notification with title: "Prius" and body: "% Package:com.dattasmoon.pebble.plugin Nameebble Notifier Continue Task After Errorn ]
<Success Pattern>
A13: Vibrate Pattern [ Pattern:%SUCCESSPATTERN ]
A14: Else
A15: Variable Set [ Name:%SSRESPONSE To:ERROR Do Mathsff Appendff ]
A16: Variable Set [ Name:%SSLASTCOMMANDRESULT To:Last comm: "%SSCOMMAND," failed. Do Mathsff Appendff ]
A17: Pebble Notifier [ Configuration:Notification with title: "Prius" and body: "% Package:com.dattasmoon.pebble.plugin Nameebble Notifier Continue Task After Errorn ]
<Error Pattern>
A18: Vibrate Pattern [ Pattern:%ERRORPATTERN ]
A19: End If
A20: Perform Task [ Name:Show Car Remote Notification Stopff Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
This one fetches the carID and keeps it in a global variable. It also needs the username and password. You may need to adjust the parsing if you have more then one car in the system.
Car Fetch Id (99)
A1: Variable Set [ Name:%SSSERVER To:https://colt.calamp-ts.com Do Mathsff Appendff ]
A2: HTTP Get [ Serverort:%SSSERVER Path:auth/login/%username/%password Attributes: Cookies: Timeout:10 Mime Type:text/* Output File:vipersessid ]
A3: Variable Set [ Name:%viperssiddata To:%HTTPD Do Mathsff Appendff ]
A4: Variable Split [ Name:%viperssiddata Splitter:"SessionID":" Delete Baseff ]
A5: Variable Split [ Name:%viperssiddata2 Splitter:"," Delete Baseff ]
A6: Variable Set [ Name:%sessid To:%viperssiddata21 Do Mathsff Appendff ]
A8: HTTP Get [ Serverort:%SERVER Path:device/advancedsearch?sessid=%sessid Attributes: Cookies: Timeout:10 Mime Type:text/* Output File:viperdata ]
A10: Variable Set [ Name:%vipervehicleiddata To:%HTTPD Do Mathsff Appendff ]
A11: Variable Split [ Name:%vipervehicleiddata Splitter:"DeviceId":" Delete Baseff ]
A12: Variable Split [ Name:%vipervehicleiddata2 Splitter:"," Delete Baseff ]
A13: Variable Set [ Name:%SSVEHICLEID To:%vipervehicleiddata21 Do Mathsff Appendff ]
Click to expand...
Click to collapse
wow thank you so much, this is great, got it to work with my car, i might work on a tasker "code" that allows my car to autocatically unlock when I am near it
maybe i'll usee the connection to my cars bluetooth, but my car has to be on first
I keep getting an input/output error. I am going step by step with a flash to see if the info is coming in correctly but I'm not getting part the 2nd action can anyone help me
****figured it out****
Sent from my LG-D801 using xda premium
An easy way to get this to work is with a program called Repetitouch. It records your swipes and taps and allows you to replay them. You can then set it up as a Tasker task and map it to a button.
Sent from my SM-N900V using Tapatalk
How did you solve the input/output error?
I am getting this error after I updated my rom on my Verizon Note 3
Upgrading to the new 4G Module
For a long time this has been working for me. I even gone as far as recreating it on a raspberry pi and integrating it with the Amazon Echo. But recently I upgraded my 3G module to the 4G module and discovered that "colt" did not manufacture the 4G module as they did with the 3G module. So the url to command the Viper system has changed. Does anyone know the url that controls the 4G module? I did some sniffing and I found part of the url as vcp.cloud/v1 but can't create that url to run the authentication. If anyone has found the url I would greatly appreciate the help.
Thanks

Save car position

Hi
Is there a way to create a small app (or scene) with
-button to save actual position
-another one for later use - use google maps/any navi to guide me to that point
[optional]
include an menu to save such points, with options to name the points
You should be able to find many examples to do that for you. If you want, I have a tasker that saves the location to my contacts...and another that navigates. You could use as and example to learn from.
Sent from my g928c powered by RiverRom RR5 and SkyHigh 5.7
Sounds great!
dwa4321 said:
Sounds great!
Click to expand...
Click to collapse
Sure, so here's my task to save a location to contacts. I can trigger it with an AutoVoice command or a shortcut icon...the task recognizes which, hence the redundancy.
Code:
LOC Save To Contact (233)
A1: Secure Settings [ Configuration:AutoInput: service.ServiceAccessibility - Enabled Timeout (Seconds):0 ]
A2: Perform Task [ Name:LOC Convert Priority:%priority + 1 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
A3: Send Intent [ Action:android.intent.action.INSERT Cat:None Mime Type: Data:content://com.android.contacts/contacts Extra:postal_type:Navigation Extra:postal:%LocLatLon Extra: Package: Class: Target:Activity ]
A4: AutoInput Action [ Configuration:Type: Id
Value: com.android.contacts:id/add_button_container
Nearby Text: address
Action : Click Timeout (Seconds):20 ]
A5: Set Clipboard [ Text:%LocAddress Add:eek:ff ]
A6: AutoInput Action [ Configuration:Type: Focus
Action : Paste Timeout (Seconds):20 ]
A7: If [ %AVCONTINUOUS !~ true ]
A8: AutoInput Action [ Configuration:Type: Text
Value: name
Action : Focus Timeout (Seconds):20 ]
A9: Else
A10: Set Clipboard [ Text:%avcommnofilter Add:eek:ff ]
A11: AutoInput Action [ Configuration:Type: Text
Value: name
Action : Paste Timeout (Seconds):20 ]
A12: AutoInput Action [ Configuration:Type: Text
Value: save
Action : Click Timeout (Seconds):20 ]
A13: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A14: Run Shell [ Command:input keyevent 4 Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In: Store Result In: ]
A15: End If
A16: Secure Settings [ Configuration:AutoInput: service.ServiceAccessibility - Disabled Timeout (Seconds):0 ]
Here's that nested task "Location Convert":
Code:
LOC Convert (242)
A1: Secure Settings [ Configuration:GPS Enabled Timeout (Seconds):0 ]
A2: Variable Set [ Name:%space To: Do Maths:eek:ff Append:eek:ff ]
A3: Get Location [ Source:Any Timeout (Seconds):100 Continue Task Immediately:eek:ff Keep Tracking:eek:n ]
A4: HTTP Get [ Server:Port:maps.google.com/maps/api/geocode/json?latlng=%LOC&sensor=false Path: Attributes: Cookies: User Agent: Timeout:10 Mime Type:text/xml Output File: Trust Any Certificate:eek:ff ]
A5: Stop Location [ Source:Any ]
A6: Variable Set [ Name:%location To:%HTTPD Do Maths:eek:ff Append:eek:ff ]
A7: Variable Split [ Name:%location Splitter:"formatted_address" Delete Base:eek:ff ]
A8: Variable Split [ Name:%location2 Splitter:"lat" Delete Base:eek:ff ]
A9: Variable Split [ Name:%location21 Splitter:, USA Delete Base:eek:ff ]
A10: Variable Split [ Name:%location211 Splitter:" Delete Base:eek:ff ]
A11: Variable Set [ Name:%LocAddress To:%location2112 Do Maths:eek:ff Append:eek:ff ]
A12: Variable Split [ Name:%location22 Splitter:"lng" Delete Base:eek:ff ]
A13: Variable Split [ Name:%location221 Splitter::%space Delete Base:eek:ff ]
A14: Variable Split [ Name:%location2212 Splitter:, Delete Base:eek:ff ]
A15: Variable Set [ Name:%lat To:%location22121 Do Maths:eek:ff Append:eek:ff ]
A16: Variable Split [ Name:%location222 Splitter::%space Delete Base:eek:ff ]
A17: Variable Split [ Name:%location2222 Splitter:%space Delete Base:eek:ff ]
A18: Variable Set [ Name:%long To:%location22221 Do Maths:eek:ff Append:eek:ff ]
A19: Variable Set [ Name:%LocLatLon To:%lat %long Do Maths:eek:ff Append:eek:ff ]
A20: Variable Split [ Name:%location2112 Splitter:, Delete Base:eek:ff ]
A21: Variable Split [ Name:%location21123 Splitter:%space Delete Base:eek:ff ]
A22: Variable Set [ Name:%LocCity To:%location21122 Do Maths:eek:ff Append:eek:ff ]
A23: Variable Set [ Name:%LocZip To:%location211233 Do Maths:eek:ff Append:eek:ff ]
And here's my navigation task. It will recognize if I've told it to navigate to a specific address, a point of interest, or to one of my contacts.
Code:
Voice Navigation (240)
A1: Variable Set [ Name:%navto To:%avcommnofilter Do Maths:eek:ff Append:eek:ff ]
A2: AutoVoice Continuous [ Configuration:
Stopping continuous voice recognition
Persistent Notification: false Timeout (Seconds):0 ]
A3: Variable Convert [ Name:%navto Function:To Lower Case Store Result In: ]
A4: Variable Search Replace [ Variable:%navto Search:[0-9] Ignore Case:eek:ff Multi-Line:eek:ff One Match Only:eek:ff Store Matches In:%addressdirect Replace Matches:eek:ff Replace With: ]
A5: AutoContacts [ Configuration:Contact Name or Nickname: %navto Timeout (Seconds):1000 Continue Task After Error:eek:n ]
A6: Wait Until [ MS:100 Seconds:0 Minutes:0 Hours:0 Days:0 ] If [ %AVCONTINUOUS ~ false ]
A7: Media Volume [ Level:15 Display:eek:ff Sound:eek:ff ]
A8: If [ %acname Set ]
A9: If [ %acaddresses1 ~ *acadd* ]
A10: For [ Variable:%contact Items:%acaddresses() ]
A11: Array Pop [ Variable:%acaddresses Position:1 To Var: ]
A12: Goto [ Type:Action Label Number:1 Label:Check Contact Address ]
A13: End For
A14: Else
A15: Variable Set [ Name:%destination To:%acaddresses1 Do Maths:eek:ff Append:eek:ff ]
A16: Flash [ Text:Navigating to contact at %acaddresses1 Long:eek:ff ]
A17: Say [ Text:Navigating to %acname at %acaddresses1 Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:eek:n Network:eek:ff Continue Task Immediately:eek:n ]
A18: End If
A19: Else If [ %addressdirect1 !Set ]
A20: Perform Task [ Name:LOC Convert Priority:%priority + 1 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
A21: Variable Set [ Name:%destination To:%navto %LocZip Do Maths:eek:ff Append:eek:ff ]
A22: Flash [ Text:Navigating to search result: %destination Long:eek:ff ]
A23: Say [ Text:Navigating to search result: %destination Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:eek:n Network:eek:ff Continue Task Immediately:eek:n ]
A24: Else
A25: Variable Set [ Name:%destination To:%navto Do Maths:eek:ff Append:eek:ff ]
A26: Flash [ Text:Navigating to address: %destination Long:eek:ff ]
A27: Say [ Text:Navigating to address: %destination Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:eek:n Network:eek:ff Continue Task Immediately:eek:n ]
A28: End If
A29: Variable Set [ Name:%Destination To:%destination Do Maths:eek:ff Append:eek:ff ]
A30: Send Intent [ Action:android.intent.action.VIEW Cat:None Mime Type: Data:google.navigation:q=%destination Extra: Extra: Extra: Package: Class: Target:Activity Continue Task After Error:eek:n ]
Edit: I haven't looked at these tasks in a long time....they could probably be a bit more efficient.
Sent from my g928c powered by RiverRom RR5 and SkyHigh 5.7
thanks! Now I need to search how to import them
What you can do, is create these Tasks:
- GPS: on (you may need to be rooted and/or have "Secure Settings" app installed in order to turn on GPS. Alternative is to do that manually)
- Wait: 30 seconds to give time to get a GPS fix
- Variable Set: set Var %CarLocation to %LOC
- Variable Split: Split %CarLocation by a comma (so you get %CarLocation1 which is the Latitude and %CarLocation2 which is the Longitude)
Now you saved your current GPS position.
To use Google, you can find the Google URL. In Tasker:
- Go to URL: find the correct URL somewhere online
Replace the coordinates of destination by the %CarLocation1 and %CarLocation2 variables.
It depends if you already turned on GPS in another Project or Task, in that case you can skip that step

On/off sixaxis controller app

This profile starts and stop sixaxis controller app
When sixaxis is off it will start it
When is on it disable it in just one click
Required su and busybox
Can be combined with autonotification app
Sixaxis (2)
A1: Run Shell [ Command:su
ps | grep com.dancingpixelstudios.sixaxiscontroller | awk '{print $9}' Timeout (Seconds):20 Use Rootff Store Output In:%sixaxischeck Store Errors In: Store Result In: Continue Task After Errorn ]
A2: If [ %sixaxischeck Set | %sixaxischeck ~ com.dancingpixelstudios.sixaxiscontroller ]
A3: Run Shell [ Command:su
am stopservice com.dancingpixelstudios.sixaxiscontroller/.SixaxisService Timeout (Seconds):0 Use Rootff Store Output In: Store Errors In: Store Result In: ]
A4: AutoNotification Tiles [ Configuration:Tile: 2
Command: sixaxis
Label: DualShock3
Icon: android.resource://net.dinglisch.android.taskerm/hl_hardware_gamepad
State: 1 Timeout (Seconds):20 Continue Task After Errorn ]
A5: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]
A6: Run Shell [ Command:su
am force-stop com.dancingpixelstudios.sixaxiscontroller Timeout (Seconds):0 Use Rootff Store Output In: Store Errors In: Store Result In: ]
A7: Variable Clear [ Name:%sixaxischeck Pattern Matchingff ]
A8: Else
A9: [X] Run Shell [ Command:su
am startservice com.dancingpixelstudios.sixaxiscontroller/.SixaxisService
fi Timeout (Seconds):0 Use Rootff Store Output In: Store Errors In: Store Result In: ]
A10: Send Intent [ Action: Cat:None Mime Type: Data: Extra: Extra: Extra: Package:com.dancingpixelstudios.sixaxiscontroller Class:com.dancingpixelstudios.sixaxiscontroller.SixaxisService Target:Service ]
A11: Variable Clear [ Name:%sixaxischeck Pattern Matchingff ]
A12: AutoNotification Tiles [ Configuration:Tile: 2
Command: sixaxis
Label: DualShock3
Icon: android.resource://net.dinglisch.android.taskerm/hd_hardware_gamepad
State: 2 Timeout (Seconds):20 Continue Task After Errorn ]
A13: End If
A14: Stop [ With Errorff Task:Sixaxis ]

My variable profile isn't active but it is when I add it to a task?

I've been using Tasker for awhile but I'm not too tech savvy so I thought I had this right but it isn't working. I basically want the sound on my phone to mute when I turn off my earbuds in certain situations. 1 of the situations I want it to turn off is when I am at home, during the week, after 6pm. I made a variable with those 3 in it called Weekdays. So I set the exit variable task If the weekday variable is set to mute my phone. When I look at the actual variable profile right now it is red, which it should be because it is not past 6pm. But when I put the variable in the task it is showing green as if it is active. Am I doing something wrong?
Here is the Weekday variable I set up 1st.
Profile: Weekdays (102)
Restore: no
Day: Mon, Tue, Wed, Thu or Fri
Time: From 6:00PM Till 6:30AM
State: Variable Value [ %ParadiseTrail Set ]
Enter: Weekdays After 6 (101)
A1: Variable Set [ Name:%Weekdays To:1 Recurse Variablesff Do Mathsff Appendff Max Rounding Digits:3 ]
Exit: Anon (106)
A1: Variable Clear [ Name:%Weekdays Pattern Matchingff Local Variables Onlyff Clear All Variablesff ]
This is the earbud profile.
Profile: Sound On With (47)
State: BT Connected [ Name:MDR-XB950BT/TOZO-NC9 Address:10:4F:A8:63:47:41/54:B7:E5:62:07:65 ]
Enter: Sound On (67)
A1: If [ %VOLN = 0 ]
A2: Sound Mode [ Mode:Sound ]
A3: Notification Volume [ Level:7 Displayff Soundff ]
A4: Ringer Volume [ Level:7 Displayff Soundff ]
Exit: Sound Off After 6pm (99)
A1: If [ %Weekdays Set ]
A2: Sound Mode [ Mode:Mute ]
A3: Else If [ %ParadiseTrail Set & %DAYW eq Saturday | %DAYW eq Sunday ]
A4: Sound Mode [ Mode:Mute ]

YouTube Vanced AutoPlay after being disconnected (not paused) from car bluetooth

Hello,
I came across XDA in my various searches for Tasker and media related inquiries. I posted this originally on Reddit and got some replies and made some things happen but it seems I've hit a dead end. What I would like to do is have my YouTube Vanced auto restart playback when I am reconnected to my car. Depending on the sequence of things, at times, the application can be paused (with the play button visible in the mini-player) and other times it has a pause button displayed in the mini player and won't initiate playback after turning back on the car.
I've been able to follow this description left by a user on Reddit - which has allowed me to playback any "APM Policy Manager start and stop output". It works with the toast notification but alas if my car is turned off and I see the pause button and not the play button, it won't continue playback on connection. My car seems to send a disconnect message and therefore I see the pause button - my headphones seem to send a pause and therefore I see a play button on the mini-player if they are ever disconnected.
Initially we are acting on logcat messages - perhaps I thought about deciphering the difference between my car disconnect message and the headphone disconnect message but I am not sure. Here is the code to make this happen - anyone try the same thing?
XML:
Profile: LP-MEDIA-DETECT
Settings: Enforce: no Notification: no
Event: Logcat Entry [ Output Variables:* Component:APM_AudioPolicyManager Filter:startOutput() Grep Filter (Check Help):Off ]
Enter Task: media-DETECT
Settings: Run Both Together
A1: [X] Multiple Variables Set [
Names: %lp_media_apps
Variable Names Splitter: #
Values: youtube|maxmpz|newpipe|bbc.sound|kodi|mx|
Values Splitter: #
Max Rounding Digits: 3 ]
A2: Run Shell [
Command: dumpsys media_session
Timeout (Seconds): 0
Store Output In: %data
Use Global Namespace: On ]
A3: Variable Search Replace [
Variable: %data
Search: (?<=packages=).*?(?=\s)
Store Matches In Array: %app ]
A4: Stop [ ]
If [ %app1 !~R %lp_media_apps ]
A5: Variable Set [
Name: %LP_STATE
To: 1
Max Rounding Digits: 3 ]
A6: Variable Search Replace [
Variable: %app1
Search: .unlock
Replace Matches: On
Continue Task After Error:On ]
If [ %app1 ~R maxmpz ]
A7: Variable Set [
Name: %lp_media_app
To: %app1
Max Rounding Digits: 3 ]
If [ %app1 !~ (?i)%lp_media_app & %app1 ~R (?i)%lp_media_apps ]
A8: Flash [
Text: %app1
Tasker Layout: On
Background Colour: #FF000000 ]
EXIT
[MEDIA STOP] PROFILE it's the same profile name and other filter
Profile: LP-MEDIA-DETECT
Settings: Notification: no
Event: Logcat Entry [ Output Variables:* Component:APM_AudioPolicyManager Filter:stopOutput() Grep Filter (Check Help):Off ]
Enter Task: media-EXIT
Settings: Run Both Together
A1: Run Shell [
Command: dumpsys media_session
Timeout (Seconds): 0
Store Output In: %data
Use Global Namespace: On ]
A2: Variable Search Replace [
Variable: %data
Search: (?<=packages=).*?(?=\s)
Store Matches In Array: %app ]
A3: Stop [ ]
If [ %app1 !~R %lp_media_apps ]
A4: Variable Clear [
Name: %LP_STATE ]
A5: Stop [ ]
A6: [X] Flash [
Text: %app1
Continue Task Immediately: On
Dismiss On Click: On ]
Here is the Reddit link as well: YouTube Vanced - AutoPlay
I have had some success with making a task with Play (simulated) on %app1 etc... but %app1 can change to the display or .... LED cover if the screen is just opened on my phone... etc. I've even tried Open App, %app1, or YouTube Vanced... simulate play or toggle paused... no avail.
Can you intercept the bluetooth disconnect message in a logcat and block it? Or change it to something? Is Tasker the right tool for all automation ideas? I have tried MacroDroid, Automate... they seem more userfriendly but then I found myself left underwhelmed - perhaps my lack of experience and knowledge is the only factor.
Cheers,
Erik

Categories

Resources