Thursday, December 22, 2011

Skype-Java-Api 1.3 version released

Hi,

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:

https://github.com/taksan/skype-java-api/issues

Thanks!

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:

<groupId>com.github.taksan</groupId>
<artifactId>native-tray-adapter</artifactId>
<version>1.1</version>

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(  
    imageUrl,   
    tooltip,  
    popup);  

Enjoy!

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!

Enjoy!

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);
...
folder.close(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...

Sunday, April 24, 2011

Skype4Java Mavenized API released!

I'm glad to announce that I have released the first version of the mavenized skype api to the maven central repo:

http://repo2.maven.org/maven2/com/github/taksan/skype-java-api/

First version is 1.1 (err, don't wanna talk about 1.0 :P), please enjoy!

I actually thought I would have more trouble to release the project in the central repo, but it was actually quite easy. Ok, there are several requirements, but they are easy to meet. The only "tricky" one was that I needed a valid domain to use as groupId. At first, I thought I would have to pay for a domain and keep it forever, but then I found out that I could use github's domain for this purpose (as you will notice if you read the pom).

I would like to thank Koji Hisano, I got in touch with him by mail to ask whether he would be okay with this move, since I mostly copied his project, and I got full support from him.

Now, all of you who'd like to use Skype4Java / Skype Java Api, please enjoy and feel free to talk back.

This version should support:

- Windows 32 and 64 bit
- Linux 32 and 64 bit
- Mac OS 32 bit

It is possible to run under MacOS 64 bit with compatibility mode (java -d32).

See ya!

Sunday, April 17, 2011

Removed SWT support and XCode build files

In the end, the API will be released without support for using the SWT version of the Windows API. I got it working pretty well using the DLLs, so it will never be an option to use the SWT version ever again.

Besides the obvious reason for not having to support and waste time a redundant alternative, I have a much more important reason to give up on SWT: the fact that it is not available as a maven dependency in the central repo. That would prevent me from deploying the project in the central.

The next thing I removed completely: any sort of support for XCode. There are just a makefile to handle the whole process, so the build is straight forward: make<enter> from the command line! The make file just requires g++4.2 installed, so it already uses only free and simple tools to build.

The windows DLLs are also buildable from the command line now, but it still requires Visual Studio's installation. In the future, I'll try to build it using mingw to build the DLLs, but I'll certainly leave that for the next version.

Anyway, this sort of stuff is only needed for those wishing to rebuild the native libraries.