Monday, July 9, 2012

Skype API version 1.4 RELEASED!!

Hi There,

Finally, I've released version 1.4. on the maven central. I intended to release earlier last week, but I bought a new computer and had a lot of trouble going from lost data to hardware incompatibility with linux.

But the time has come! I worked quite a bit on this version to fix a lot of bugs and I hope it is more stable under every OS platform. Here are the release notes:

  • Windows :
    • now the native library can be compiled using mingw, both under windows and linux. It is still possible to compile using visual studio, but mingw compilation is preferred.
    • a small bug in getInstaledPath function has been fixed.
    • fixed native library extraction and loading
  • Mac OS :
    • fixed problems with getProfile and other functions that depended on deprecated MESSAGE object have been fixed.
    • framework extraction fixed to work both from jar and eclipse

  • Linux : a major rewrite has been done. There are now two native implementations, the old one using X11 and a new one using DBUS. The X11 version was very unstable and sometimes would even connect to a skype instance running on another user.
The default implementation is now DBUS, which proved much more stable on my tests. It is still possible to use the old implementation setting a JAVA System variable, "skype.api.impl", to x11.

Besides the bug fixes, some new features have been added:

  • Chat.setGuidelines : can be used to change a set guidelines
  • Chat.addListener : allows registering a listener that will be triggered for users entering and leaving a chat
  • Skype.addChatEditListener : allows adding a listener that will be triggered when messages are edited

Besides, the samples have been moved to its own project and a lot of refactorings have been to done to organize the code.

The samples can be found on the following project:

Again, for newcomers, you can use the API adding the following dependency to your maven project:


There is also a shaded jar, if you prefer:

That's it for now. Please, feel free to drop bug reports, I'll try to be more promptly from now on.

Thursday, June 28, 2012

Skype Java API 1.4 on the oven

After a long time doing nothing at all related to the skype java api, I recently had some motivation to work on some skype projects and that made me work on some open issues.

First, I rewrote the whole linux native api because the existing X11 implementation isn't very stable, crashes on some newer computers, and other annoying problems.

So, I wrote a dbus alternative that proved much more reliable. I also fixed some bugs that have been reported under windows and I intend to fix all the currently reported bugs under windows.

And finally, on the bug hunting subject, I'll be working on the bugs under Mac OS. I haven't dedicated much time to fix the bugs reported under Mac OS because that is the platform I know least. In fact, I don't own a MacBook and I have to use VM to work on these bugs. But I understand that the mac os native library is the least stable, so I intend to dedicate a lot of effort to understand its code better and fix these issues for once.

As for new features, I implemented to extra listeners:

- ChatListener : a listener triggered when users enter or leave a group chat

- ChatMessageEditListener: a listener triggered when messages are edited

 Another change: I moved all the samples to their own project:

 I believe it will be easier to get started with the api if the samples are not mixed with the api code.

And finally, some propaganda on some of my new skype projects:

A simple application that sends files from the bash command line:

Another simple application to send messages to users or group chats from the command line (as you can see, I love doing stuff from command line)

 Epyk Survey is a bot that manages simple polls in skype group chats. It has been very useful in among my coworkers to decide where we'll lunch everyday =)

That's it. Thanks for you patience Takeuchi

Thursday, December 22, 2011

Skype-Java-Api 1.3 version released


After a long hiatus, I finally got back to work on some fixes to skype api. The new 1.3 version includes fixes for the following bugs:

- A bug that would crash the library under Ubuntu linux 11.04 (some NPEs)
- The mac version was not firing the notification to listeners when a new message was received
- Two applications using skype-java-api would crash under windows because the dynamic libraries were extracted directly under temp directory under windows. Now, each instance use their own directoies
- Skype.addCallListener would add a listener even if the connection could not be made
- Skype.removeCallListener throws NPE if no listeners were not registered
- Added a README to explain how to use the library in your maven project
- Windows libraries are now statically linked. This UnsatisfiedLink problems if a system does not have vc90 library

If you find any problems, please, feel free to report in the project's github issue page:


Monday, May 23, 2011

Java Tray Icon Transparency Under Linux

Well, like many people before me, I had problems with my tray icons under linux. The JDK implementation has a bug that renders tray icons with transparency with an ugly gray background instead of the transparent background.

This is really annoying to me and I really don't like the idea of providing an application that looks half-assed. So, I actually got around this problem creating a small native library that implements the tray icon using gtk.

So, if you end up having tray icon problems, you may use my little artifact. The source code is here. I also deployed in the central, you can use it putting the following dependency:


The usage is very simple:

 SystemTrayAdapter trayAdapter = SystemTrayProvider.getSystemTray();  
 URL imageUrl = getClass().getResource("myImage.svg");  
 String tooltip = "I'm transparent under linux!";   
 PopupMenu popup = produceMyPopupMenu();  
 TrayIconAdapter trayIconAdapter = trayAdapter.createAndAddTrayIcon(  


Friday, May 6, 2011

First run bug

I just uploaded a new version fixing a bug that would make the application crash the first time you run against a non-synchronized account.

I didn't notice this bug because I was testing against an account that already had the "Skype-Chats" label (shame on me =).

See ya.

Monday, May 2, 2011

Alpha version available

I'm glad to announce that I have an alpha version that does mostly everything. You can grab it from here or just use the panel in the side frame.

To use it, just do:

java - jar skype2gmail-1.0.jar --mail

It will ask whatever it needs to synchronize. And you can also use as the following:

java - jar skype2gmail.jar --disk

It will dump all your messages to directory in the user home ($HOME/.skype2gmail/history).

Feel free to report any bugs or send any feature requests!


It is hard to trash messages from gmail..

I found out that it is very hard to remove a message from gmail using the LDAP api. At first, I just tried doing the following:

((Message)message).setFlag(Flags.Flag.DELETED, true);

This should work for common ldap accounts, but it doesn't work properly in gmail. It just removes the message from the "folder", which is actually mapped as a gmail label. The message will remain under "All messages". Next, I found that I should move the message to the trash folder:

Folder skypeFolder = mailStore.getFolder("Skype-Chats");
Folder trash =  mailStore.getFolder("[Gmail]/Trash");

Message[] messagesToRemove = new Message[]{messageToRemove};
skypeFolder.copyMessages(messagesToRemove, trash);
// and just to make sure
mimeMessage.setFlag(Flags.Flag.DELETED, true);

Well, it did work... kinda. A problem still remained: if you send a new message with the same sender and subject, the "deleted" message gets resurrected.

I couldn't figure out how to remove it permanently. I got around the problem changing the subject, when need...