Help - Search - Members - Calendar
Full Version: Skype API Lib for Java skype2rtc example code?
Skype Community > English > Development, Betas and Skype Garage > Skype Public API
cyberindy_
Hi all,

I spent some time now trying all the available Java approaches to the Skype API. So far I like the skype2rtc lib http://www.sourceforge.net/skype2rtc/ best from what I have seen in the sources.

Unfortunately I couldn't find any documentation or explanation for this lib. Even the source code is uncommented.

Has anyone of you already worked with this package? Any example code or hints would be highly appreciated!

Thanks a lot!
- cyberindy
joffrey_
Hi cyberindy,

I've made the Skype API Lib fo Java. I'll post example code asap right there and in the official website http://www.skype2rtc.info

Have a nice day.
Regards,
Joffrey
cyberindy_
Joffrey you're my hero ... you made my day!

...though my French really sucks, I'll try it anyway blush.png
Merci beaucoup!
J'espère que tu va continuer le travaille avec l'API.
A la prochaine!
- cyberindy
joffrey_
gr8 man !
You're not so bad in French wink.png

à bientôt

Cordialement,
Joffrey.
cyberindy_
Hi Joffrey!

What happened to that homepage of yours? I wanted to check if anything happened and I keep getting error messages.

Are you alright?
- cyberindy
ashishgauswami_
hi cyberindy

i tried using Skype API Lib fo Java. it is very easy. first u have to download bridge2java from ibm. and u have to get all classes under com.ibm.bridge2java package in to ur class path.

then write the following code:
OleEnvironment.initialize();
Access a = new Access();
a.connect();

and its done.
to receive events/messages u have to register ur class implementing _IAccessEvents interface with a.add_IAccessEventsListener();

try this. if u have any problem i will help u.

Ashish
ashishgauswami_
hay joffrey

is your Skype Api Lib for java is FREE? can i use it for commercial distribution? and What about bridge2java? i think its from IBM and its not free.
Waiting for your reply.

Ashish
cyberindy_
Hi ashishgauswami,

thanks a lot for your kind help. I already started playing around with the API...

The code compiled fine:
CODE


import skypeAPILib.*;

import com.ibm.bridge2java.*;



public class SkypeTest

{



public static void main(String[] args)

{

 try

 {

  OleEnvironment.Initialize();

  Access a = new Access();

  a.Connect();

                       //the class that implements _IAccessEvents

  IAccessEvents listener = new IAccessEvents();

  a.add_IAccessEventsListener(listener);

 }

 catch (Exception e)

 {

  e.printStackTrace();

 }

}

}



Yet I get a nasty runtime error when calling the default constructor of Access:

CODE


com.ibm.bridge2java.ComException

at com.ibm.bridge2java.Dispatch.CreateObjectB2J(Native Method)

at com.ibm.bridge2java.Dispatch.<init>(Dispatch.java:39)

at skypeAPILib.IAccess.<init>(IAccess.java:16)

at skypeAPILib.Access.<init>(Access.java:11)

at SkypeTest.main(SkypeCrawler.java:23)



Do you have an idea how to solve this problem?
Thanks again for your offer to help!
- cyberindy
ashishgauswami_
i m sorry i forgot tell u this step.

u have to register the SkypeAPI.dll file in to ur machine.

just open ur Run window (Windows key + R) and give following command.

regsvr32 c:SkypeAPI.dll (whatever may be ur path).

also bridge2java.dll shud be in ur LD_LIBRARY_PATH or inside winntsystem32 folder.

Ashish
cyberindy_
@ashishgauswami

Thanks. That solved it. Now it's working like a charm and I can start developing smile.png

Thank you so much!!!

- cyberindy
ashishgauswami_
thats gr8 bigsmile.png

[quote]hay joffrey

is your Skype Api Lib for java is FREE? can i use it for commercial distribution? and What about bridge2java? i think its from IBM and its not free.
Waiting for your reply.

Ashish[/quote]

do u have any idea on this?

Ashish
cyberindy_
Ok ... I did a little browsing:

On the IBM website I found a link where you can purchase a license for the InterfaceTool https://secure.alphaworks.ibm.com/awlr.nsf/...m&n=bridge2java
(for 1000USD :shock: ) ... so my guess it's not meant to be distributed in commercial products without such a license ...

Hope this helps!
- cyberindy
xic_
and TWO dll's, not the most briliant way.....
ashishgauswami_
hi xic

gr8 to see u!!
when we will get the next version of JSkype aka JSA?

actually i also wanted to use JSkype instead of Skype API Lib for Java. but there is some problems with JSkype.dll. i tried to fix it i couldn't. (i m not that good at windows programming). i faced the following problem.

when i run the example swtClient for the first time it works fine.
but when i run it for second time it give me the error "Couldn't send message" from the DLL. and that is because win32 error "invalid window handle".

do u have solution for this? please share it with me.

Ashish
ashishgauswami_
hi cyberindy

Assume that u have not logged in into skype and skype is not loaded into your system tray.

Then run your java application. it will popup skype for login.

now dont login and cancel the login dialog and close skype.

(your java application will take default behaviour whatever u have written.)

now the problem comes here.
after some time skype login dialog will again popup and this time also if u cancel it, it will come again and this process continues for 4-5 times and even more.

Have u faced this problem? (if yes then have u find any solution?)

Ashish
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.