Oder Text markieren und Enter drücken…

SkypeAPIviaProcessing

How to access the Skype API (Application programming interface) via Processing by using the Skype4java library.

Accessing the Skype API via Processing

 

Skype has a public API everyone can Access. (read more about the API and Skype)

This API enables you to do every task or Interaction you can do with in Skype as well from another (self written) program.

In this little tutorial we will show how to access the the API using Processing and the Skype4java library, further more you will find a Example on how to send commands to an Arduino form Processing when a new Message was received in Skype.

Skype4java is a Wrapper Library to access the API for Programs written in Java, like Processing sketches are.    

This library, you can download from the internet, seems to work fine for windows, but we couldn't find a version running on a Mac Intel Computer.

So we downloaded the source of the library and tried to compile a version for intel mac's (32 bit). We also had to do some changes to the code, since the Skype API Protocol seems to have changed over time.

This new compiled library was testet on a MacBook Intel Core Duo. (running: Snow Leopard | Skype 2.8.0.851 | Processing 1.0.9 | Arduino 17)

web_fernsprecher

download

  • the Skype API reference here
  • Skype4Java for windows here
  • Skype4Java for intel mac here
  • some examples for Porcessing and Arduino (Mac) here
  • one example for Porcessing (Windows) here

 Note: The Windows example is just one simple example, because we haven't had the time to test it further more. Sorry for that.

 

set up the library (Windows)

 As usually you have to copy the library to your processing sketch folder.

The path should look like something like this

YourProcessingSketchFolder/libraries/skype/library/skype.jar

 

set up the library (Mac)

Setting up the library on a Mac is a little bit more difficult, it seems we have done some mistakes while compiling.

As usually you have to copy the library to your processing sketch folder.
The path should look like something like this

YourProcessingSketchFolder/libraries/skype/library/skype.jar

 

Further more you have to copy the Skype framework to the framework folder on your mac.
you will find the skype.framework folder inside your Skype application packet. Go to the skpye.app file inside your application folder, right click onto the skype.app and select "show packet content", and search inside the packet for the folder skype.framework.

Directly on your hadrive is a folder called Library, in this Library folder is a folder called framework, and in there you need to copy the skype.framework folder. You should really just copy the files, otherwise you screw up your skype application.
The path sould look like:

yourHarddrive/Library/Frameworks/Skype.framework

Note: the library is not 64bit compatible. you have to run Processing in 32bit mode, therefor you need to change your java preference. You will find the java preference under /Applications/Utilities/Java Preferences.app. in the preference you need to set 32bit to the top: like shown in this picture here
 

getting started

First of all you have to start Skype, it always need to be running in the back.

If you added the library to Processing in the right way, you should be able to see the Skype lib in Processing under sketch >> Import Library, if the Skype lib doesn't show up there some thing went wrong with the Import.

(Note: You always need to restart Processing after adding a library)


Now you can start screwing around, try out the different functions and check out the tab example_function to see how the communication between Skype and Processing works.

If you set the Debug boolean to true the library will print some more informations to the console.

If you want to check out the Arduino example, you have to flash your Arduino with the code, you will find in the example folder, and in the processing sketch you need to set the arduinoInUse boolean to true.

(Note: the Arduino example was tested with an Arduino using the FTDI chip for communication, don't know if it is the same with the new boards)


Maybe you should get a new Skype account for your try outs, so you don't mess around with your friends or accidentally delete some one.

last pic

 

 if you want to have the source code to the mac lib or have some questions, feel free to write me: info(attt)tomekness.de