Adium

Opened 5 years ago

Last modified 2 years ago

#11870 new enhancement

Google Voice SMS functionality

Reported by: sam1am Owned by: ryanrhee90
Milestone: Good ideas for later Component: Service/Other
Version: Severity: normal
Keywords: Gv, google voice, voice, sms, text Cc:
Patch Status:

Description

I would love to see functionality to allow the use of Google voice SMS services through Adium. Since GV does not provide a public API, new SMS messages can be retrieved periodically from an JSON-formatted file and new SMS messages can be sent through an HTTP POST.

Retrieve messages from: https://www.google.com/voice/inbox/recent/sms/

To send a message: POST /voice/sms/send/ id=&phoneNumber=[number to text]&text=[URL Encoded message]&_rnr_se=[pull from page]

The hard part is how to handle the messages. There is already some integration with address book and this is probably the best route to take. New SMS comes in, number is matched against address book, message pops up as being from that contact. If that contact has an IM address already then even better - they can be combined. This would offer functionality similar to the Palm Pre where a conversation can be held between IM and SMS depending on the availability of the contact.

Although SMS isn't really an IM protocol, I believe it fits under Adium's goal of consolidating "instant messaging" technologies. It increases the ability to instantly communicate with others in a huge way as you can now use adium to talk to people who don't use IM or who use both IM and SMS on their phone. The demand for this sort of thing will only increase as GV is rolled out to more people.

Change History (33)

comment:1 Changed 5 years ago by jas8522

  • Milestone set to Waiting on libpurple

Seems like a rather messy way of accomplishing it. We have already seen how nasty Facebook chat is whenever they change the layout of their site.

Although we don't necessarily need Libpurple to do new protocols (take Zac's Twitter support and the original Facebook support by Evan for example), having the core network functions for this built in to Libpurple would certainly make supporting it in Adium more likely.

comment:2 Changed 5 years ago by zacw

  • Status changed from new to closed

Closing all "waiting on libpurple" tickets. There's no reason to keep them around as open, and largely go ignored anyway. File a ticket at http://developer.pidgin.im for any functionality you want to see.

comment:3 Changed 5 years ago by anonymous

  • Milestone Waiting on libpurple deleted

Milestone Waiting on libpurple deleted

comment:4 Changed 4 years ago by ryanrhee90

I'd like to re-open this ticket- and take ownership of it.
I'm a CS major at my university, and if no one else is working on it, I'd like to make this possible.

comment:5 Changed 4 years ago by Robby

  • Status changed from closed to new

You're very welcome to do it. Don't let a closed ticket stop you. :)

comment:6 Changed 4 years ago by Robby

  • Owner changed from nobody to ryanrhee90

comment:7 Changed 4 years ago by ryanrhee90

Expect an update shortly :)

comment:8 Changed 4 years ago by ryanrhee90

I'm having trouble even compiling a dummy plugin to work correctly with the devel version of adium 1.4
The guides posted on trac.adium are outdated.

If anyone can give me a hand, shoot me an email please.
ryanrhee at ryanrhee dot net

-R

comment:9 Changed 4 years ago by ryanrhee90

I'm still having trouble getting a plugin working correctly.
Don't email me at the above e-mail address, since it no longer works.
Anyone that can help, please email me! My e-mail should be posted on my profile.

I have google voice on adium working through gvmax. This is a temporary solution for me.
I'd still like to write a adiumx plugin for google voice, i just need some pointers to get me started.

-R

comment:10 Changed 4 years ago by Robby

Hey Ryan, contact the developers via email or IRC: http://trac.adium.im/wiki/FollowingDevelopment

comment:11 Changed 4 years ago by ryanrhee90

Finally, I feel like I know enough cocoa and obj-c to start writing this plugin.

For anyone interested in the progress, I'm going to start by writing the auth process.
I'll be using google's OAuth authentication. Also, i'll be using a framework to get this done.

I'll update the page as the project progresses.

Just FYI -- Apparently my account on trac.adium.im got deleted since the last time I updated. I had to recreate my login. O_o;;

comment:12 Changed 4 years ago by ryanrhee90

quick update: google voice doesn't seem to support OAuth because it doesn't have an official API. :(
For now, I gotta go with a ClientLogin.

More updates to come!

comment:13 Changed 4 years ago by ryanrhee90

FYI: I'm writing all the backend functionality first before writing a plugin to implement them.
Got login working. Also, sending SMS by number works. I'm gonna call it a day.
I'm not sure how I'm going to implement sending SMS by name -- I could either use apple's Address Book or use Google Contacts. I'm leaning towards AB at the moment.

Next, I'll be making the program get the contents of the inbox. That'll have to wait 'till tomorrow!

-R

comment:14 Changed 4 years ago by Robby

Good man! :)

comment:15 Changed 4 years ago by ryanrhee90

Most of the backend functionality regarding Google Voice is done.
The SMS functionality for this backend has been tested pretty well. The rest -- like voice mail, calling, etc, is there, but hasn't been tested.

I'm planning to make a .framework out of what I have for google voice before proceeding to make the Adium Plugin part of it.

I'll keep everyone (all 2 people that are reading this) posted. ;)

-R

comment:16 Changed 4 years ago by ylluminate

This is really excellent work. So glad to hear this and I know a few people that are very much looking forward to the functionality!

comment:17 Changed 4 years ago by ryanrhee90

Sorry for the recent lack of updates -- I've been swamped at work trying to finish up a project before my contract period is over.
But the idle time did help the project in a way, since I was working with Cocoa at work. I'm much more familiar with the framework than I was when I started this project.

Yesterday, I reduced the XML parsing code -- which used to be around 500 lines of code -- down to 50 lines of code (!) and made it much more efficient, modular, flexible and tolerant of possible changes to google's XML schema.

In regards to the back-end functionality, the only challenge left is to somehow keep track of the conversations which have already been "read" by the framework. (You wouldn't want a text message conversation between you and your friend to appear repeatedly each time the backend reloaded the data.) I think I'll be using the "isRead" flag, but I haven't come up with an elegant solution just yet.

-R

comment:18 Changed 4 years ago by bound008

@ryanrhee90 do you want some help on this... i have been playing around with making a GV iphone app, and using all nice JSON that you can get from the mobile version of google voice... if you want a good idea of it you can check out pygooglevoice

comment:19 Changed 4 years ago by ryanrhee90

Hi bound008,

Thanks for offering your help. I've thought about the project some more and decided that I need to re-organize my object structure if I want this to be maintainable and scalable.

I've looked at pygooglevoice many times, but thanks for the hint anyway. (:

Also, it's not as simple as it sounds -- the JSON only contains info about each conversation (without the contents of the conversation itself.) The XML contains the HTML in CDATA tags that contain the actual contents of the conversation itself. They can be cross-referenced by the conversation ID.

The way I'm planning to parse them is as follows:

  1. Parse the JSON to get all conversations on each page.

For each conversation from the JSON, create a "conversation" object.
Each conversation object will be initiated with all the information (contact name, phone number, etc.) but will have no content.

Note: There should be the same number of conversations in the JSON as there are conversations in the XML, and they should match up -- as in the first conv. in the JSON should be the info about the fist conv. in the XML tags.)

  1. Then, parse the XML and populate the contents of the conversation.

Note: I will assert that the conversation parsed from XML has the same conversation ID as the conversation parsed from the JSON earlier and throw an error -- just in case google changes their structure one day.

  1. From here, I'll have the conversations in a manageable data structure. The googlevoice lib will implement functions to retrieve this data easily.

Keep in mind that I'm a college student and it's no longer summer -- I don't have as much free time anymore. I promise I'll get to it! (I want to use it just as much as you guys ;).

Thanks for being patient and keeping up with the plugin!

Best,
-R

comment:20 Changed 4 years ago by David Munch

  • Milestone set to Good idea for "later"

comment:21 Changed 3 years ago by mgodwin

Ryan - any updates on this? This would be a killer feature for adium. Do you need any help?

comment:22 Changed 3 years ago by ryanrhee90

mgodwin,

Yes, I could always use some help. :)
Specifically, if you could start making sort of a "front-end" to the plugin, that'd be extremely helpful.

Email me if you really are serious about helping out. I'm still working on a few final details on the backend, but the important parts are all complete.

-R

comment:23 Changed 3 years ago by mgodwin

I'm feeling slightly retarded but where can I find your profile to email you?

comment:24 Changed 3 years ago by ryanrhee90

haha, i looked around and couldn't find out either. ryanrhee 90 at <google's free email service>

comment:25 Changed 3 years ago by bugmenot

are we using pygooglevoice here? it seems like it would be a bit of a waste of time to not utilize existing code.

comment:26 Changed 3 years ago by voxadam

Hoping this is still being worked on.

comment:27 Changed 3 years ago by ryanrhee90

It is. A couple of days ago, I decided to take bugmenot's suggestion and am trying to utilize pygooglevoice, but trying to call python as a backend from obj-c seems to be a real b*tch.

If anyone can lend a helping hand with this, I'd appreciate it.

-R

Last edited 3 years ago by ryanrhee90 (previous) (diff)

comment:28 Changed 3 years ago by Robby

Ticket #15448 has been marked as a duplicate of this ticket.

comment:29 Changed 3 years ago by superbuffbird

Thanks Robby, when i searched i couldn't find this ticket before i made that dupe. Looks like a lot of good work has been happening. Keep going Ryan, this is going to make Adium PERFECT!

comment:30 Changed 2 years ago by SimDan

If it is at all helpful, there's a BSD-liscensed Obj-C library for Google Voice at https://bitbucket.org/joeygibson/gvoice/wiki/Home Would have less calling issues than the python library. ;-)

comment:31 follow-up: Changed 2 years ago by AutoEntropy

Any luck on this yet. This is the last thing holding Adium back from perfection in my eyes. I hope you guys can do this. I wish I could help but I'm in the design business. Thanks in advance.

comment:32 in reply to: ↑ 31 ; follow-up: Changed 2 years ago by David Munch

Replying to AutoEntropy:

Any luck on this yet. This is the last thing holding Adium back from perfection in my eyes. I hope you guys can do this. I wish I could help but I'm in the design business. Thanks in advance.

Currently no one is working on it I believe. But you can help by providing a bounty for the ticket.. :)

comment:33 in reply to: ↑ 32 Changed 2 years ago by AutoEntropy

Replying to David Munch:

Replying to AutoEntropy:

Any luck on this yet. This is the last thing holding Adium back from perfection in my eyes. I hope you guys can do this. I wish I could help but I'm in the design business. Thanks in advance.

Currently no one is working on it I believe. But you can help by providing a bounty for the ticket.. :)

Yeah I don't think I'm going to do that.

Note: See TracTickets for help on using tickets.