Sending auto reply text via google voice

1,873 views
Skip to first unread message

win...@yahoo.com

unread,
Nov 8, 2012, 4:25:23 PM11/8/12
to tas...@googlegroups.com

This task I'm working on is for fun but it'll teach me things that I may be able to use in other tasks in the future that will help make life a little easier.

I only use Google voice (GV) for texting since I don't have a texting plan with Verizon. I've already set up my profile to read GV texts outloud when connected to my car's BT. The next step I'd like to have happen is to get the phone # or name from the notification title (if possible) to send an auto reply that I'm in the car & will text back when able. The step after that would be to have the phone send me a pop up message once BT disconnects to remind me to reply to the text (this part I've got working already).

I don't know how to write scripts but I've read posts about using the plug in "Execute" to simulate key presses such as "!input keyevent 82". The closest I've gotten is to have tasker open GV, simulate exit a couple of times to make sure I exit out of GV completely, then reload GV, press DPAD down button, DPAD press, DPAD right x2, DPAD press, type my message "I'm driving......", DPAD right, DPAD press, then the message gets sent but not all of the time.

The problem is that if I don't exit out of GV completely every time I use it, when the task runs, GV gets loaded at the place where I last left it ..... hence the 2 exits I put in the task then reload..... but that still doesn't work all of the time. Sometimes you need to exit once, sometimes more, depending on how you last left the app.

I know there's a much more elegant way to do this but I have no idea what that could be. It would be easier If there's a execute command to go to the app's home page & not to my phone's home screen. I didn't find such an option.

I also would like a way to capture the phone # from the notification title to ensure I am sending the auto reply to the right person & not simply to the person whose text is located at the top of the GV app's home page.

Hope that all made sense. Cheers!

P.S. thanks for this awesome app. I am having so much fun learning how to use it!

Matt R

unread,
Nov 8, 2012, 7:34:19 PM11/8/12
to tas...@googlegroups.com
Let me break this down a bit as you have a few issues listed.
 
1) Capturing the phone number of the text: not easily possible unfortunately.  The easiest solution is to have a list of names and associated numbers hard-coded into Tasker.  Something like Variable Set %ReplyNumber to 555-555-5555 If %NTITLE matches Joe*, Variable Set %ReplyNumber to 555-555-0199 If %NTITLE matches Jane*, etc.  If there are only a handful of people you text often, this is probably the best.  The other more robust method involves looking up the phone number given the contact name using either SL4A or an Sqlite shell script to pull it from your address book.  If you'd like to do it this way, search the forum for "contact database" or similar.
 
2) Opening GV to correct screen: this is actually fairly easy (once you have the correct number).  You just need to send an intent with Tasker.  Under the Misc category pick Send Intent.  In the Action box put android.intent.action.SENDTO and in the data field put smsto:xxx.  Replace xxx with the contact phone number.  Finally, at the bottom, change the Target to Activity.  Running this intent action will bring you straight to a screen to send an SMS to the specified number.
 
3)  Alternate to opening GV with intent as above: you can use the GV SMS plugin from Steelgirder (https://play.google.com/store/apps/details?id=com.steelgirder.LocaleGVSMSPlugin).  It works well, but does cost $2.
 
Matt

Dreamer

unread,
Nov 9, 2012, 1:15:31 AM11/9/12
to Tasker
Thanks for the advice. As this is a "fun" project, I will look at the
"contact database" search and see what I can learn. In the meantime, I
will enter the few people I text most often into a variable. And I
found the info on the sending intent for composing GV texts after I
sent my original post.

Cheers!

On Nov 8, 4:34 pm, Matt R <matthew.rosenbr...@gmail.com> wrote:
> Let me break this down a bit as you have a few issues listed.
>
> 1) Capturing the phone number of the text: not easily possible
> unfortunately.  The easiest solution is to have a list of names and
> associated numbers hard-coded into Tasker.  Something like Variable Set
> %ReplyNumber to 555-555-5555 If %NTITLE matches Joe*, Variable Set
> %ReplyNumber to 555-555-0199 If %NTITLE matches Jane*, etc.  If there are
> only a handful of people you text often, this is probably the best.  The
> other more robust method involves looking up the phone number given the
> contact name using either SL4A or an Sqlite shell script to pull it from
> your address book.  If you'd like to do it this way, search the forum for
> "contact database" or similar.
>
> 2) Opening GV to correct screen: this is actually fairly easy (once you
> have the correct number).  You just need to send an intent with Tasker.
> Under the *Misc* category pick *Send Intent*.  In the *Action* box put *
> android.intent.action.SENDTO* and in the data field put *smsto:xxx*.
> Replace *xxx* with the contact phone number.  Finally, at the bottom,
> change the *Target* to *Activity*.  Running this intent action will bring
> you straight to a screen to send an SMS to the specified number.
>
> 3)  Alternate to opening GV with intent as above: you can use the GV SMS
> plugin from Steelgirder (https://play.google.com/store/apps/details?id=com.steelgirder.LocaleG...).
Reply all
Reply to author
Forward
Message has been deleted
0 new messages