First it lets you right click on a contact and choose a Send Email option which opens up your default email app. You can save whichever email you'd like to associate with that contact when you choose the Edit Email / SMS preferences option. I added Send Email because I had seen it on other chat clients and its really simple to implement. I think it should be a part of the Adium Source.
The second thing the plugin does is enable you to send free sms messages to a contacts with US Phone numbers from AT&T, AllTell, Metro Call, Nextel, Sprint PCS, T-Mobile, Verizon, Virgin Mobile. I have only tried sending to T-Mobile and AT&T and both worked fine. You have to save your contact's SMS settings before attempting to send a text message. Each service provider has a limit on the message length. I'll look into that and add that information to later versions.
How it works
The plugin is actually a convenience rather than something that does something new. It sends the sms messsages via email; a service which almost all Phone companies now provide for free. I got this idea from my Software Engineering class last semester where we built a board game hub in which we managed a database of players and their respective board games. (We had just Tic Tac Toe and Chess). When it was your turn to make a move, the system would send you either an email or txt message notification depending on your saved settings.
Feedback
The main reason I did this was to get me started learning Cocoa and Objective C. There's a couple of things I'd like feedback on for both the source and plugin itself.
For the source:
- Any general comments regarding how sections of code could be better done i.e. making the code more efficient.
- Currently I use Unix's mailx to send the txt message. I think almost every mac should have it, there might however be exceptions. I looked into various options when trying to implement this. There was an email framework called MailCore that I tried using. The only problem with it is that it needs information on the server that is doing the mail sending (ie. server name, user name, password etc.).
- Ideally I would like to implement this by having the code send the txt message to some Wireless Application Protocol or SMS gateway that then forwards the messages to the phones. There is open source stuff to help set up these gateways (Kannel is one example) but I don't want to have to host the hardware to do this. If anyone knows of any free SMS or WAP gateways that can be used for I would appreciate having that information.
- The messages on the phone are formatted a certain way. ie. The sms message has a number as a subject with yourMacusername@yourmachinename.local. I'm looking into how to format the message so it displays only your contact's screenname or something like "Adium TXT from contactName" in the subject heading. Any hints on how to achieve that would be much appreciated.
- The UI needs work. Or maybe not. Any comments on it are welcome.
- If you can think of any additions or modifications to the idea let me know, I'll see if I can implement them.
Thanks to all those nice people on #adium and #adium-devl who helped me with bugs. Also, big thanks to Peter Gibson, a lot of the source was based on his Time Zone Plugin. I leave for Uganda in a week and some days so I'll be working on this all week so that its hopefully ready for release before I leave.
To install the plugin, drag it onto the Adium icon in the dock and restart Adium.
To use right click on a contact and you will see the following options:
Send Email...
Edit Email/SMS Settings...
Send SMS...
To uninstall the plugin navigate to
yourHomeDirectory/Library/Application Support/Adium 2.0/Plugins and delete the plugin.
AGAdiumSMSPlugin
AGAdiumSMSPlugin Source Code
9 comments:
Installing this plugin does nothing to my Adium.
Apparently this plugin crashes when Adium loads. I'm using Adium 1.0.5, OS X 10.4.10. Here is the error from console.log:
2007-07-27 16:26:14.131 Adium[303] *** -[NSBundle load]: Error loading code /Users/usernamemasked/Library/Application Support/Adium 2.0/PlugIns/AGAdiumSMSPlugin.AdiumPlugin/Contents/MacOS/AGAdiumSMSPlugin for bundle /Users/usernamemasked/Library/Application Support/Adium 2.0/PlugIns/AGAdiumSMSPlugin.AdiumPlugin, error code 2 (link edit error code 0, error number 0 ())
2007-07-27 16:26:14.132 Adium[303] Failed to obtain principal class "(null)" from plugin "AGAdiumSMSPlugin.AdiumPlugin" ("/Users/usernamemasked/Library/Application Support/Adium 2.0/PlugIns/AGAdiumSMSPlugin.AdiumPlugin")! infoDictionary: {
CFBundleDevelopmentRegion = English;
CFBundleExecutable = AGAdiumSMSPlugin;
CFBundleExecutablePath = "/Users/usernamemasked/Library/Application Support/Adium 2.0/PlugIns/AGAdiumSMSPlugin.AdiumPlugin/Contents/MacOS/AGAdiumSMSPlugin";
CFBundleIdentifier = "com.yourcompany.yourcocoabundle";
CFBundleInfoDictionaryVersion = "6.0";
CFBundleInfoPlistURL = Contents/Info.plist -- file://localhost/Users/usernamemasked/Library/Application%20Support/Adium%202.0/PlugIns/AGAdiumSMSPlugin.AdiumPlugin/;
CFBundleName = AGAdiumSMSPlugin;
CFBundleNumericVersion = 16809984;
CFBundlePackageType = BNDL;
CFBundleSignature = "????";
CFBundleVersion = "1.0";
NSBundleInitialPath = "/Users/usernamemasked/Library/Application Support/Adium 2.0/PlugIns/AGAdiumSMSPlugin.AdiumPlugin";
NSBundleLanguagesList = ("English.lproj");
NSBundleResolvedPath = "/Users/usernamemasked/Library/Application Support/Adium 2.0/PlugIns/AGAdiumSMSPlugin.AdiumPlugin";
NSBundleResourcePath = "/Users/usernamemasked/Library/Application Support/Adium 2.0/PlugIns/AGAdiumSMSPlugin.AdiumPlugin/Contents/Resources";
}
2007-07-27 16:26:14.132 Adium[303] Failed to initialize Plugin "AGAdiumSMSPlugin.AdiumPlugin" ("/Users/usernamemasked/Library/Application Support/Adium 2.0/PlugIns/AGAdiumSMSPlugin.AdiumPlugin")!
I fixed the problem and updated the plugin.
It was dumb me doing only an Intel build instead of a Universal build.
Sorry about the crash. :(
I have written a simple applescript to send an sms message to my phone via email, alerting me that I have a message. Although I can't figure out how to capture and send the actual message that I received.
Do you see any way that your plugin could be utilized in this manner?
There's a bug in the plug-in. You haven't defined NSPrincipalClass in your Info.plist, so the plug-in crashes on load in Leopard as NSBundle plucks a random class from the bundle and Adium tries to send installPlugin to it.
The fix is really simple: Just define NSPrincipalClass as the name of your subclass of AIPlugIn.
I don't use your plug-in myself, but one of our users (who is also one of your users) emailed us saying that Adium would not launch on Leopard with your plug-in installed. I asked her for Console output, and she sent it, and it revealed the problem (it said that SendSMSWindowController does not recognize the -installPlugin selector).
Also, you should use svn export to produce tarballs. Your source tarball is at least twice as large as it needs to be because it includes all of svn's bookkeeping directories.
Hey Peter,
Thanks for letting me know about the bugs. I think I should disable the plugin for a while till I get those fixed since people will keep reporting the same problem.
Thanks again,
George.
It doesn't work with 1.3.1.
Do you think you'll be making a new one?
I have Adium 1.5.10, I clicked on the link you have listed for "Adium SMS Plugin" and when I click it, I get the following message...
Not Found
The requested URL /~armahg/AGAdiumSMSPlugin.zip was not found on this server.
Apache/2.2.22 (Ubuntu) Server at www.cs.lafayette.edu Port 80
I used to use AOL to text to phone numbers via Adium, however AOL/AIM no longer works at all, so this option is no longer available.
Is this plugin available? where can I download it if it is available?
I MISS being able to text to a phone number, PLEASE HELP!!
Post a Comment