at first I have to say that I'm totally new to the Java-Skype thing, but I would like to play arround with this to get a better knowledge.
I've created a virtual labor with the jMonkeyEngine and want to use a telephone in this labor. For that I loaded Skype via CVS in Eclipse. Up to now I can make calls, but I also want to accept incoming calls.
The problem is, that I couldn't find good description how to make this. Maybe I can get help here.
This is the Listener I've tried to implement for tests, but I get only an output for outgoing calls and not for incoming calls. Can someone give me some advice or code samples ?
CODE
try{
Skype.setDeamon(false);
Skype.addCallListener(new CallListener(){
@Override
public void callMaked(Call makedCall) throws SkypeException{
if(makedCall.getType().equals(Call.Type.OUTGOING_P2P)){
System.out.println("Out");
}
}
@Override
public void callReceived(Call receivedCall) throws SkypeException{
if(receivedCall.getType().equals(Call.Type.INCOMING_P2P)){
System.out.println("In");
}
}
});
}catch (Exception e){
System.out.println(e);
}
Skype.setDeamon(false);
Skype.addCallListener(new CallListener(){
@Override
public void callMaked(Call makedCall) throws SkypeException{
if(makedCall.getType().equals(Call.Type.OUTGOING_P2P)){
System.out.println("Out");
}
}
@Override
public void callReceived(Call receivedCall) throws SkypeException{
if(receivedCall.getType().equals(Call.Type.INCOMING_P2P)){
System.out.println("In");
}
}
});
}catch (Exception e){
System.out.println(e);
}
Thanks in advance.