Help - Search - Members - Calendar
Full Version: detect receiving calls in Java
Skype Community > English > Development, Betas and Skype Garage > Skype Public API
Mexxchen
Hi,

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);
            }


Thanks in advance.
Mexxchen
Hi, I tested this code on 2 other machines. They are identic to mine (HW and SW) and the Skype version is also the same (3.2.0.158). The strange thing is, that it works for outgoing AND incoming calls only on one of the two machines and also not on the other. Has someone an idea?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.