taksan / skype-java-api

Skype API for Java, based on Skype4Java library
128 stars 60 forks source link

Check wheither skypeClient authorized ?? #55

Open minedun6 opened 9 years ago

minedun6 commented 9 years ago

I'm trying to figure a way out as to check if the user authorized my application to use Skype, else I'll just use the SkypeClient.showRequestAuthorizationWindow(); which gives me this error : com.skype.NotAttachedException at com.skype.Utils.convertToSkypeException(Utils.java:57) at com.skype.Utils.executeWithErrorCheck(Utils.java:226) at com.skype.SkypeClient.showRequestAuthorizationWindow(SkypeClient.java:359)

Caused by: com.skype.connector.NotAttachedException at com.skype.connector.Connector.assureAttached(Connector.java:987) at com.skype.connector.Connector.execute(Connector.java:904) at com.skype.connector.Connector.execute(Connector.java:861) at com.skype.connector.Connector.execute(Connector.java:827) at com.skype.connector.Connector.execute(Connector.java:786) at com.skype.connector.Connector.execute(Connector.java:656) at com.skype.Utils.executeWithErrorCheck(Utils.java:223)

Another thing to is that when I run the Skype.isInstalled(), there is an error pointing that skype is not installed on my system when I have properly installed ^^

this section over here is for further improvement, yu can write a run method method along with the isRuning() to open skype when its process is shutdown. yu can also write a checkAuthorization to see if the user authorized their program via skype, if not we use the SkypeClient.showRequestAuthorizationWindow(); to prompt the authorization.

And thx for this great lib ^^

anandbansal5 commented 8 years ago

Even I am facing the same issue. I get isInstalled as false. :( Is there any confirguration setting that needs to be done?