That being said, the code is on github here (in the TextCommand folder) and is available under GPLv3 for anyone to use.
I know this could (maybe even should) have its own github project but since I use it for my home automation projects, its included in the PiAUISuite. That being said, the current gvapi binary is also compiled for the Pi. So you will need to run make gvapi if you want to use it on any other linux machine.
To include the C++ code in your own project, you just need to include gvoice.h in your file and then you should be able to access the GoogleVoice class. An excellent example to look at is gvapi.cpp since it shows how to interact with it. You should need only to call Init and Login, then you should be able to do any of the Google voice functions.
If you only to use gtextcommand to send commands to your pi, see here. If you want to send or check SMS without having to include the source in your code/project, just use the gvapi program. It can get contacts, send, receive, and delete SMS. It also comes in with built in spoof protection (this is included in GoogleVoice::CheckSMS).
Heres a quick video demo as an example of the kinds of things you can do with gvapi
Using the gvapi program is fairly simple and its man page is below:
gvapi
gvapi - Use of Google voice API in order to send and receive SMS
SYNOPSIS
gvapi [OPTIONS]...DESCRIPTION
gvapi was compiled for use with home automation on the Raspberry Pi but will work on any linux system with an internet connection. It uses curl and boost regex in order to login and stores the cookie in /dev/shm. It only logs in once every 24 hours to save time. It supports a multitude of different options and parameters. For help/comments/questions, feel free to e-mail me at help@stevenhickson.com. I answer sporadically but do eventually respond.OPTIONS
- -?
- Same as -h
- -c
- Checks your incoming text messages to see if you have anything unread. It will mark it whatever it outputs as read unless you also use the -r flag. If you include a number with the -n flag, you can specify it to only check messages received from that number. You can also use the -k flag to specify that the message must start with a certain keyword.
- -d
- Sets debug mode on. You can also specify debug mode from 1 - 3, where 3 is the most verbose.
Ex: gvapi -c -d2 - -h
- Asks for some quick general use help for gvapi.
- -i
- Outputs the contacts of your google voice account in the form name==number
- -k KEYWORD
- Sets a keyword that has to be in the beginning of the text message for it to be returned. This is useful as a password for parsing only certain messages.
- -m MESSAGE
- Sends the message you specify. This should be in quotes if it contains special characters or a space. The number also has to be specified otherwise it wont have a message to send
Ex: gvapi -n +15551234 -m Hello - -n NUMBER
- Can be used with the -c flag to check messages from a certain number or the -m flag to send a message. Can be in a format without the country code, with just the country code, or with a plus sign and the country code. If the formost, it interprets it as a US number.
Ex: gvapi -n 5551234 -c - -p PASSWORD
- Can be used with the -u flag to log in manually. If not specified, the program uses the default username and password specified in ~/.gv
- -r
- Receives and deletes SMS messges. Can be used with the -c flag or without. It is the same as the -c flag but instead of just marking the messages as read. It deletes them.
- -u USERNAME
- Can be used with the -p flag to log in manually. See the -p flag for more details. Cannot be used without the -p flag.
- -v
- Outputs version and creater information
AUTHOR
Steven Hickson (help@stevenhickson.com)BUGS
No known bugs. To report bugs, send a clear description to help@stevenhickson.comSince this program is fairly crude, user typos could cause crashes/failed responses. Please read the man page thoroughly before submitting a bug.COPYRIGHT
Copyright © 2013 Steven Hickson. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it as long as you give credit to the author and include this license. There is NO WARRANTY, to the extent permitted by law.HISTORY
This is the second major version of this programSEE ALSO
http://stevenhickson.blogspot.com/Consider donating to further my tinkering.
Places you can find me
Related Post:
computer
- Take a better selfie with Lily
- Free Lecture The Psychology of Computer Insecurity
- MOOC Research and Innovation
- Calculating Ada The Countess of Computing
- When can Quantum Annealing win
- Creating a templated Binary Search Tree Class in C
- Projecting without a projector sharing your smartphone content onto an arbitrary display
- Will a robot take your job
- Facebook Introduces ‘Hack ’ the programming language of the future
- High Resolution Scary Haunted House Wallpapers for Desktop
- TYBSC IT Sem V Question Papers 2009 Mumbai University
- Home automation update
- Very easy to download youtube videos audio mp3 format
- HD Dark Desktop Background Wallpapers Download
- Launching the Quantum Artificial Intelligence Lab
- Syrias children learn to code with the Raspberry Pi
- Running omxplayer from the command line easily using alias
- Largest collection of Google Logos on the web Set 7
- Collection of SQL queries with Answer and Output Set 2
- Prevent access to specific partition or drive
- Summer Games Learn to Program
- PiAUISuite Update and Voicecommand v3 1
- Sign in to edx org with Google and Facebook and
- Large Scale Machine Learning for Drug Discovery
- Hacker Tricks from Insiders A Threat to ERP Systems
c
0 comments:
Post a Comment