Switch default SMS on location w/o prompt

124 views
Skip to first unread message

Krayakin

unread,
Jul 15, 2014, 2:51:26 PM7/15/14
to tas...@googlegroups.com
I'm not sure if this is possible. Tasker is pretty foreign to me.

I want to switch my default SMS app based on my location (wifi-near/network location if wifi disabled). 

Profile: Default SMS (2)
State: Wifi Near [ SSID:GuestInternet MAC:<MAC ADDR> Capabilities:* Min. Activate Signal Level:0 Channel:0 Toggle Wifi:Off ]
Enter: Switch SMS (3)
A1: Set SMS App [ App:EvolveSMS ] 
A2: Variable Set [ Name:%Smsapp To:com.klinker.android.evolve_sms Do Maths:Off Append:Off ] 

Exit: Revert (4)
A1: Set SMS App [ App:Hangouts ] 
A2: Variable Set [ Name:%Smsapp To:com.google.android.talk Do Maths:Off Append:Off ] 


So few questions: 

  1. How would I go about checking my location based on wifi first, if wifi disabled, check based on network towers/gps?
  2. Is there a way to confirm the default sms app switch prompt automatically?
  3. Can I add a shortcut to my home screen (nova) that would point to the current default SMS app?
Reason for this: While at work I prefer to keep my phone off me, but still want to be able to easily respond to SMS. EvolveSMS allows for responding to SMS from the desktop (via pushbullet or endlessjabber). When not at work I'd like to use hangouts.

Thanks!

Brandon Horwath

unread,
Jul 15, 2014, 5:23:26 PM7/15/14
to tas...@googlegroups.com
I'd say lets see if tasker can achieve what you want without diving into location first.

While I don't believe there is a way to set the default app, there may be a way tasker can send the desired info to the desired app through using intents. The catch, is I have no idea what the intent syntax required would be for sending that info to a specific app. Maybe someone can point you in the right direction, or contact the app developers for the neccesary info.

Basically, with this suggestion your default app would be one that tasker can recognize as SMS received. That data would be sent to the desired SMS app via an intent. Unfortunately, another downside would probably be duplicate texts in various SMS apps. Your default would contain a 'master list' of all SMS, and the various SMS apps you use would have the relevant SMSs based on location (once that detail is finalized).

Krayakin

unread,
Jul 15, 2014, 5:28:20 PM7/15/14
to tas...@googlegroups.com
I actually just got the default sms application switch working (built into tasker, Phone -> Set SMS App) based on cell tower location OR near WIFI, and the launcher icon (purchased https://play.google.com/store/apps/details?id=com.joaomgcd.autoapps)

My current hurdles are
  1. Only search for near wifi when the cell tower location is my work area
  2. Acknowledge (say yes) to "Change SMS App?" dialog (http://goo.gl/mIJj6C example of dialog)

Brandon Horwath

unread,
Jul 15, 2014, 5:40:00 PM7/15/14
to tas...@googlegroups.com
I actually just got the default sms application switch working (built into tasker, Phone -> Set SMS App) based on cell tower location OR near WIFI, and the launcher icon (purchased https://play.google.com/store/apps/details?id=com.joaomgcd.autoapps)

Would ya look at that... I keep forgetting about tasker actions that have a red 'X' for me :/ sorry!

My current hurdles are
Only search for near wifi when the cell tower location is my work area
Acknowledge (say yes) to "Change SMS App?" dialog (http://goo.gl/mIJj6C example of dialog)

You can look into 'input tap' in the forum (requires root, which I suspect you might have). Also 'location without tears' in the userguide.

Glad you got that setup so easily ;-) that was an unexpected surprise.

Krayakin

unread,
Jul 15, 2014, 6:18:23 PM7/15/14
to tas...@googlegroups.com
Ah! input tap worked perfectly! Now to tackle location properly.

Krayakin

unread,
Jul 15, 2014, 10:10:48 PM7/15/14
to tas...@googlegroups.com
Ok! I think I have this working fully now!

I'll have to wait until tomorrow to test it out (too lazy to change everything just to test while I'm at home)

Brought in this profile to set a variable for when the screen is unlocked so I can use input tap: http://tasker.wikidot.com/extendedvariables 
Here's the profile:
<?xml version="1.0" encoding="UTF-8"?>
<TaskerData sr="" dvi="1" tv="4.3u4m">
   <Profile sr="prof2" ve="2">
      <cdate>1405447668045</cdate>
      <clp>true</clp>
      <edate>1405476332608</edate>
      <id>2</id>
      <limit>true</limit>
      <mid0>3</mid0>
      <mid1>4</mid1>
      <nme>EvolveSMS</nme>
      <State sr="con0" ve="2">
         <code>170</code>
         <Str sr="arg0" ve="3">GuestInternet</Str>
         <Str sr="arg1" ve="3">[MAC ADDRESSES ARE HERE]</Str>
         <Str sr="arg2" ve="3" />
         <Int sr="arg3" val="0" />
         <Int sr="arg4" val="0" />
         <Int sr="arg5" val="0" />
      </State>
   </Profile>
   <Task sr="task3">
      <cdate>1405447684420</cdate>
      <edate>1405476080268</edate>
      <id>3</id>
      <nme>Switch To Evolve</nme>
      <pri>10</pri>
      <Action sr="act0" ve="5">
         <code>252</code>
         <App sr="arg0">
            <appClass>com.klinker.android.evolve_sms.ui.MainActivity</appClass>
            <appPkg>com.klinker.android.evolve_sms</appPkg>
            <label>EvolveSMS</label>
         </App>
      </Action>
      <Action sr="act1" ve="5">
         <code>35</code>
         <Int sr="arg0" val="30" />
         <Int sr="arg1" val="0" />
         <Int sr="arg2" val="0" />
         <Int sr="arg3" val="0" />
         <Int sr="arg4" val="0" />
         <ConditionList sr="if">
            <Condition sr="c0" ve="2">
               <lhs>%myDISPLAY</lhs>
               <op>0</op>
               <rhs>unlocked</rhs>
            </Condition>
         </ConditionList>
      </Action>
      <Action sr="act2" ve="5">
         <code>123</code>
         <Str sr="arg0" ve="3">input tap 537 735</Str>
         <Int sr="arg1" val="0" />
         <Int sr="arg2" val="1" />
         <Str sr="arg3" ve="3" />
         <Str sr="arg4" ve="3" />
         <Str sr="arg5" ve="3" />
      </Action>
      <Action sr="act3" ve="5">
         <code>547</code>
         <Str sr="arg0" ve="3">%Smsapp</Str>
         <Str sr="arg1" ve="3">com.klinker.android.evolve_sms</Str>
         <Int sr="arg2" val="0" />
         <Int sr="arg3" val="0" />
      </Action>
   </Task>
   <Task sr="task4">
      <cdate>1405447766230</cdate>
      <edate>1405475880555</edate>
      <id>4</id>
      <nme>Revert to Hangouts</nme>
      <pri>10</pri>
      <Action sr="act0" ve="5">
         <code>252</code>
         <App sr="arg0">
            <appClass>com.google.android.talk.SigningInActivity</appClass>
            <appPkg>com.google.android.talk</appPkg>
            <label>Hangouts</label>
         </App>
      </Action>
      <Action sr="act1" ve="5">
         <code>35</code>
         <Int sr="arg0" val="30" />
         <Int sr="arg1" val="0" />
         <Int sr="arg2" val="0" />
         <Int sr="arg3" val="0" />
         <Int sr="arg4" val="0" />
         <ConditionList sr="if">
            <Condition sr="c0" ve="2">
               <lhs>%myDISPLAY</lhs>
               <op>0</op>
               <rhs>unlocked</rhs>
            </Condition>
         </ConditionList>
      </Action>
      <Action sr="act2" ve="5">
         <code>123</code>
         <Str sr="arg0" ve="3">input tap 537 735</Str>
         <Int sr="arg1" val="0" />
         <Int sr="arg2" val="1" />
         <Str sr="arg3" ve="3" />
         <Str sr="arg4" ve="3" />
         <Str sr="arg5" ve="3" />
      </Action>
      <Action sr="act3" ve="5">
         <code>547</code>
         <Str sr="arg0" ve="3">%Smsapp</Str>
         <Str sr="arg1" ve="3">com.google.android.talk</Str>
         <Int sr="arg2" val="0" />
         <Int sr="arg3" val="0" />
      </Action>
   </Task>
</TaskerData>
Reply all
Reply to author
Forward
0 new messages